xref: /webtrees/resources/views/modals/link-media-to-source.phtml (revision bd29d468ac3a5ed7a23d7dd8f300504dda83fc72)
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    <?= view('modals/header', ['title' => I18N::translate('Link this media object to a source')]) ?>
17
18    <div class="modal-body">
19        <div class="mb-3">
20            <label class="col-form-label" for="link">
21                <?= I18N::translate('Source') ?>
22            </label>
23            <?= view('components/select-source', ['name' => 'link', 'tree' => $tree]) ?>
24        </div>
25    </div>
26
27    <?= view('modals/footer-save-cancel') ?>
28
29    <?= csrf_field() ?>
30</form>
31
32