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 array<int|string,string> $media_types 12 * @var Tree $tree 13 * @var array<string,string> $unused_files 14 */ 15 16?> 17 18<form method="post" action="<?= e(route(AddMediaFileAction::class, ['xref' => $media->xref(), 'tree' => $media->tree()->name()])) ?>" enctype="multipart/form-data"> 19 <?= view('modals/header', ['title' => I18N::translate('Add a media file')]) ?> 20 21 <div class="modal-body"> 22 <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'media_file' => null, 'media_types' => $media_types, 'tree' => $tree, 'unused_files' => $unused_files]) ?> 23 </div> 24 25 <?= view('modals/footer-save-cancel') ?> 26 27 <?= csrf_field() ?> 28</form> 29