1d70512abSGreg Roach<?php 2d70512abSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5455a30feSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectFromFile; 6455a30feSGreg Roachuse Fisharebest\Webtrees\I18N; 7d70512abSGreg Roach 8455a30feSGreg Roach/** 9455a30feSGreg Roach * @var array<int|string,string> $media_types 10455a30feSGreg Roach */ 11d70512abSGreg Roach?> 12dd6b2bfcSGreg Roach 13dd6b2bfcSGreg Roach<div class="modal" id="modal-create-media-from-file"> 14ddb44b4cSGreg Roach <form method="post" action="<?= e(route(CreateMediaObjectFromFile::class)) ?>" id="modal-create-media-from-file-form"> 15dd6b2bfcSGreg Roach <input type="hidden" name="action" value="create-media-object-from-file"> 16d72b284aSGreg Roach <input type="hidden" name="tree" id="tree" value=""> 17dd6b2bfcSGreg Roach <div class="modal-dialog modal-lg" role="document"> 18dd6b2bfcSGreg Roach <div class="modal-content"> 19dd6b2bfcSGreg Roach <div class="modal-header"> 20dd6b2bfcSGreg Roach <h3 class="modal-title"><?= I18N::translate('Create a media object') ?></h3> 21315eb316SGreg Roach <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?= I18N::translate('close') ?>"> 22dd6b2bfcSGreg Roach </button> 23dd6b2bfcSGreg Roach </div> 24dd6b2bfcSGreg Roach <div class="modal-body"> 259e3c2cf9SGreg Roach <div class="row mb-3"> 26dd6b2bfcSGreg Roach <label class="col-form-label col-sm-2" for="file"> 27dd6b2bfcSGreg Roach <?= I18N::translate('Media file') ?> 28dd6b2bfcSGreg Roach </label> 29dd6b2bfcSGreg Roach <div class="col-sm-10"> 30dd6b2bfcSGreg Roach <input type="text" class="form-control" id="file" name="file" value="" readonly> 31dd6b2bfcSGreg Roach </div> 32dd6b2bfcSGreg Roach </div> 339e3c2cf9SGreg Roach <div class="row mb-3"> 34dd6b2bfcSGreg Roach <label class="col-form-label col-sm-2" for="title"> 35dd6b2bfcSGreg Roach <?= I18N::translate('Title') ?> 36dd6b2bfcSGreg Roach </label> 37dd6b2bfcSGreg Roach <div class="col-sm-10"> 38dd6b2bfcSGreg Roach <input type="text" class="form-control" name="title" id="title"> 39dd6b2bfcSGreg Roach </div> 40dd6b2bfcSGreg Roach </div> 419e3c2cf9SGreg Roach <div class="row mb-3"> 42dd6b2bfcSGreg Roach <label class="col-form-label col-sm-2" for="type"> 43dd6b2bfcSGreg Roach <?= I18N::translate('Media type') ?> 44dd6b2bfcSGreg Roach </label> 45dd6b2bfcSGreg Roach <div class="col-sm-10"> 46455a30feSGreg Roach <?= view('components/select', ['name' => 'type', 'selected' => '', 'options' => $media_types]) ?> 47dd6b2bfcSGreg Roach </div> 48dd6b2bfcSGreg Roach </div> 499e3c2cf9SGreg Roach <div class="row mb-3"> 50dd6b2bfcSGreg Roach <label class="col-form-label col-sm-2" for="note"> 51dd6b2bfcSGreg Roach <?= I18N::translate('Note') ?> 52dd6b2bfcSGreg Roach </label> 53dd6b2bfcSGreg Roach <div class="col-sm-10"> 54b51c2707SGreg Roach <textarea class="form-control" id="note" name="note" rows="5" dir="auto"></textarea> 55dd6b2bfcSGreg Roach </div> 56dd6b2bfcSGreg Roach </div> 57dd6b2bfcSGreg Roach </div> 58dd6b2bfcSGreg Roach <div class="modal-footer"> 59dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 60d993d560SGreg Roach <?= view('icons/save') ?> 61dd6b2bfcSGreg Roach <?= I18N::translate('save') ?> 62dd6b2bfcSGreg Roach </button> 63315eb316SGreg Roach <button type="button" class="btn btn-text" data-bs-dismiss="modal"> 64d993d560SGreg Roach <?= view('icons/cancel') ?> 65dd6b2bfcSGreg Roach <?= I18N::translate('cancel') ?> 66dd6b2bfcSGreg Roach </button> 67dd6b2bfcSGreg Roach </div> 68dd6b2bfcSGreg Roach </div> 69dd6b2bfcSGreg Roach </div> 7081443e3cSGreg Roach 7181443e3cSGreg Roach <?= csrf_field() ?> 72dd6b2bfcSGreg Roach </form> 73dd6b2bfcSGreg Roach</div> 74