xref: /webtrees/resources/views/modals/edit-media-file.phtml (revision 0db1e7d20bab9209012a4f3fdc1af3ef87a1a528)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\EditMediaFileAction;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Media;
8use Fisharebest\Webtrees\MediaFile;
9use Fisharebest\Webtrees\Tree;
10
11/**
12 * @var string                   $max_upload_size
13 * @var Media                    $media
14 * @var MediaFile                $media_file
15 * @var array<int|string,string> $media_types
16 * @var Tree                     $tree
17 */
18
19?>
20
21<form method="post" action="<?= e(route(EditMediaFileAction::class, ['xref' => $media->xref(), 'tree' => $media->tree()->name(), 'fact_id' => $media_file->factId()])) ?>" enctype="multipart/form-data">
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
30    <?= csrf_field() ?>
31</form>
32