xref: /webtrees/resources/views/modals/link-media-to-family.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToRecordAction;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Media;
8use Fisharebest\Webtrees\Tree;
9
10/**
11 * @var Media $media
12 * @var Tree $tree
13 */
14
15?>
16
17<form method="post" action="<?= e(route(LinkMediaToRecordAction::class, ['tree' => $tree->name(), 'xref' => $media->xref()])) ?>" id="wt-modal-form">
18    <?= view('modals/header', ['title' => I18N::translate('Link this media object to a family')]) ?>
19
20    <div class="modal-body">
21        <div class="mb-3">
22            <label class="col-form-label" for="link">
23                <?= I18N::translate('Family') ?>
24            </label>
25            <?= view('components/select-family', ['name' => 'link', 'tree' => $tree]) ?>
26        </div>
27    </div>
28
29    <?= view('modals/footer-save-cancel') ?>
30
31    <?= csrf_field() ?>
32</form>
33
34