1d70512abSGreg Roach<?php 2d70512abSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5ddb44b4cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddMediaFileAction; 6d70512abSGreg Roachuse Fisharebest\Webtrees\I18N; 7ddb44b4cSGreg Roachuse Fisharebest\Webtrees\Media; 8ddb44b4cSGreg Roachuse Fisharebest\Webtrees\Tree; 9ddb44b4cSGreg Roach 10ddb44b4cSGreg Roach/** 11ddb44b4cSGreg Roach * @var string $max_upload_size 12ddb44b4cSGreg Roach * @var Media $media 13455a30feSGreg Roach * @var array<int|string,string> $media_types 14ddb44b4cSGreg Roach * @var Tree $tree 15ddb44b4cSGreg Roach * @var array<string,string> $unused_files 16ddb44b4cSGreg Roach */ 17d70512abSGreg Roach 18d70512abSGreg Roach?> 19dd6b2bfcSGreg Roach 20ddb44b4cSGreg Roach<form method="post" action="<?= e(route(AddMediaFileAction::class, ['xref' => $media->xref(), 'tree' => $media->tree()->name()])) ?>" enctype="multipart/form-data"> 21dd6b2bfcSGreg Roach <?= view('modals/header', ['title' => I18N::translate('Add a media file')]) ?> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach <div class="modal-body"> 24455a30feSGreg Roach <?= view('modals/media-file-fields', ['max_upload_size' => $max_upload_size, 'media_file' => null, 'media_types' => $media_types, 'tree' => $tree, 'unused_files' => $unused_files]) ?> 25dd6b2bfcSGreg Roach </div> 26dd6b2bfcSGreg Roach 27dd6b2bfcSGreg Roach <?= view('modals/footer-save-cancel') ?> 2881443e3cSGreg Roach 2981443e3cSGreg Roach <?= csrf_field() ?> 30dd6b2bfcSGreg Roach</form> 31