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