xref: /webtrees/resources/views/modals/edit-media-file.phtml (revision 4c3563c0d95e22997e247ca4944dff997416f927)
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 Tree      $tree
14 */
15
16?>
17
18<form method="post" action="<?= e(route(EditMediaFileAction::class, ['xref' => $media->xref(), 'tree' => $media->tree()->name(), 'fact_id' => $media_file->factId()])) ?>" enctype="multipart/form-data">
19    <?= csrf_field() ?>
20
21    <?= view('modals/header', ['title' => I18N::translate('Edit a media file')]) ?>
22
23    <div class="modal-body">
24        <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'unused_files' => [], 'media_file' => $media_file, 'tree' => $tree]) ?>
25    </div>
26
27    <?= view('modals/footer-save-cancel') ?>
28</form>
29