1852ede8cSGreg Roach<?php 2dd6b2bfcSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 52d111ef4SGreg Roachuse Fisharebest\Webtrees\Contracts\ElementInterface; 6852ede8cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryAction; 7852ede8cSGreg Roachuse Fisharebest\Webtrees\I18N; 8edbd59d9SGreg Roachuse Fisharebest\Webtrees\Tree; 9edbd59d9SGreg Roach 10edbd59d9SGreg Roach/** 112d111ef4SGreg Roach * @var array<string,ElementInterface> $elements 12edbd59d9SGreg Roach * @var Tree $tree 13edbd59d9SGreg Roach */ 14852ede8cSGreg Roach 15852ede8cSGreg Roach?> 16852ede8cSGreg Roach 17852ede8cSGreg Roach<form method="post" action="<?= e(route(CreateRepositoryAction::class, ['tree' => $tree->name()])) ?>" id="wt-modal-form"> 18dd6b2bfcSGreg Roach <?= view('modals/header', ['title' => I18N::translate('Create a repository')]) ?> 19dd6b2bfcSGreg Roach 20dd6b2bfcSGreg Roach <div class="modal-body"> 212d111ef4SGreg Roach <?= view('modals/repository-fields', ['elements' => $elements, 'tree' => $tree]) ?> 22dd6b2bfcSGreg Roach </div> 23dd6b2bfcSGreg Roach 24dd6b2bfcSGreg Roach <?= view('modals/footer-save-cancel') ?> 2581443e3cSGreg Roach 2681443e3cSGreg Roach <?= csrf_field() ?> 27dd6b2bfcSGreg Roach</form> 28dd6b2bfcSGreg Roach 29dd6b2bfcSGreg Roach<script> 3045ed5d1dSGreg Roach document.getElementById('wt-modal-form').addEventListener('submit', webtrees.createRecordModalSubmit); 31dd6b2bfcSGreg Roach</script> 32