xref: /webtrees/resources/views/modals/create-submission.phtml (revision 45ebc6c6221f90468111ed2015b8449dca331d93)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmissionAction;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var Tree $tree
11 */
12
13?>
14
15<form method="post" action="<?= e(route(CreateSubmissionAction::class, ['tree' => $tree->name()])) ?>" id="wt-modal-form">
16    <?= view('modals/header', ['title' => I18N::translate('Create a submission')]) ?>
17
18    <div class="modal-body">
19        <?= view('modals/submission-fields', ['tree' => $tree]) ?>
20    </div>
21
22    <?= view('modals/footer-save-cancel') ?>
23
24    <?= csrf_field() ?>
25</form>
26
27<script>
28  document.getElementById('wt-modal-form').addEventListener('submit', webtrees.createRecordModalSubmit);
29</script>
30