xref: /webtrees/resources/views/modals/edit-media-file.phtml (revision 81443e3cbe4eef5ccdcf8dae716a7e35f7417b60)
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    <?= view('modals/header', ['title' => I18N::translate('Edit a media file')]) ?>
21
22    <div class="modal-body">
23        <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'media_file' => $media_file, 'media_types' => $media_types, 'tree' => $tree, 'unused_files' => []]) ?>
24    </div>
25
26    <?= view('modals/footer-save-cancel') ?>
27
28    <?= csrf_field() ?>
29</form>
30