xref: /webtrees/resources/views/modals/add-media-file.phtml (revision 842a873c0b92c28d4af3fa9db0e9156057005569)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\AddMediaFileAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Media;
6use Fisharebest\Webtrees\Tree;
7
8/**
9 * @var string               $max_upload_size
10 * @var Media                $media
11 * @var Tree                 $tree
12 * @var array<string,string> $unused_files
13 */
14
15?>
16
17<form method="post" action="<?= e(route(AddMediaFileAction::class, ['xref' => $media->xref(), 'tree' => $media->tree()->name()])) ?>" enctype="multipart/form-data">
18    <?= csrf_field() ?>
19
20    <?= view('modals/header', ['title' => I18N::translate('Add a media file')]) ?>
21
22    <div class="modal-body">
23        <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => $unused_files, 'media_file' => null, 'tree' => $tree]) ?>
24    </div>
25
26    <?= view('modals/footer-save-cancel') ?>
27</form>
28