1<?php 2 3use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectFromFile; 4use Fisharebest\Webtrees\I18N; 5 6/** 7 * @var array<int|string,string> $media_types 8 */ 9?> 10 11<div class="modal" id="modal-create-media-from-file"> 12 <form method="post" action="<?= e(route(CreateMediaObjectFromFile::class)) ?>" id="modal-create-media-from-file-form"> 13 <input type="hidden" name="action" value="create-media-object-from-file"> 14 <input type="hidden" name="tree" id="tree" value=""> 15 <div class="modal-dialog modal-lg" role="document"> 16 <div class="modal-content"> 17 <div class="modal-header"> 18 <h3 class="modal-title"><?= I18N::translate('Create a media object') ?></h3> 19 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> 20 </button> 21 </div> 22 <div class="modal-body"> 23 <div class="row mb-3"> 24 <label class="col-form-label col-sm-2" for="file"> 25 <?= I18N::translate('Media file') ?> 26 </label> 27 <div class="col-sm-10"> 28 <input type="text" class="form-control" id="file" name="file" value="" readonly> 29 </div> 30 </div> 31 <div class="row mb-3"> 32 <label class="col-form-label col-sm-2" for="title"> 33 <?= I18N::translate('Title') ?> 34 </label> 35 <div class="col-sm-10"> 36 <input type="text" class="form-control" name="title" id="title"> 37 </div> 38 </div> 39 <div class="row mb-3"> 40 <label class="col-form-label col-sm-2" for="type"> 41 <?= I18N::translate('Media type') ?> 42 </label> 43 <div class="col-sm-10"> 44 <?= view('components/select', ['name' => 'type', 'selected' => '', 'options' => $media_types]) ?> 45 </div> 46 </div> 47 <div class="row mb-3"> 48 <label class="col-form-label col-sm-2" for="note"> 49 <?= I18N::translate('Note') ?> 50 </label> 51 <div class="col-sm-10"> 52 <textarea class="form-control" id="note" name="note" rows="5" dir="auto"></textarea> 53 </div> 54 </div> 55 </div> 56 <div class="modal-footer"> 57 <button type="submit" class="btn btn-primary"> 58 <?= view('icons/save') ?> 59 <?= I18N::translate('save') ?> 60 </button> 61 <button type="button" class="btn btn-text" data-bs-dismiss="modal"> 62 <?= view('icons/cancel') ?> 63 <?= I18N::translate('cancel') ?> 64 </button> 65 </div> 66 </div> 67 </div> 68 69 <?= csrf_field() ?> 70 </form> 71</div> 72