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 <?= csrf_field() ?> 14 <input type="hidden" name="action" value="create-media-object-from-file"> 15 <input type="hidden" name="tree" id="tree" value=""> 16 <div class="modal-dialog modal-lg" role="document"> 17 <div class="modal-content"> 18 <div class="modal-header"> 19 <h3 class="modal-title"><?= I18N::translate('Create a media object') ?></h3> 20 <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> 21 <span aria-hidden="true">×</span> 22 </button> 23 </div> 24 <div class="modal-body"> 25 <div class="form-group row"> 26 <label class="col-form-label col-sm-2" for="file"> 27 <?= I18N::translate('Media file') ?> 28 </label> 29 <div class="col-sm-10"> 30 <input type="text" class="form-control" id="file" name="file" value="" readonly> 31 </div> 32 </div> 33 <div class="form-group row"> 34 <label class="col-form-label col-sm-2" for="title"> 35 <?= I18N::translate('Title') ?> 36 </label> 37 <div class="col-sm-10"> 38 <input type="text" class="form-control" name="title" id="title"> 39 </div> 40 </div> 41 <div class="form-group row"> 42 <label class="col-form-label col-sm-2" for="type"> 43 <?= I18N::translate('Media type') ?> 44 </label> 45 <div class="col-sm-10"> 46 <?= view('components/select', ['name' => 'type', 'selected' => '', 'options' => $media_types]) ?> 47 </div> 48 </div> 49 <div class="form-group row"> 50 <label class="col-form-label col-sm-2" for="note"> 51 <?= I18N::translate('Note') ?> 52 </label> 53 <div class="col-sm-10"> 54 <textarea class="form-control" id="note" name="note" rows="5" dir="auto"></textarea> 55 </div> 56 </div> 57 </div> 58 <div class="modal-footer"> 59 <button type="submit" class="btn btn-primary"> 60 <?= view('icons/save') ?> 61 <?= I18N::translate('save') ?> 62 </button> 63 <button type="button" class="btn btn-text" data-dismiss="modal"> 64 <?= view('icons/cancel') ?> 65 <?= I18N::translate('cancel') ?> 66 </button> 67 </div> 68 </div> 69 </div> 70 </form> 71</div> 72