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