xref: /webtrees/resources/views/modals/create-submission.phtml (revision c3521ffbed61b05f09224c99d6eea071a548f363)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmissionAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var Tree $tree
9 */
10
11?>
12
13<form method="post" action="<?= e(route(CreateSubmissionAction::class, ['tree' => $tree->name()])) ?>" id="wt-modal-form">
14    <?= csrf_field() ?>
15
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</form>
24
25<script>
26  document.getElementById('wt-modal-form').addEventListener('submit', webtrees.createRecordModalSubmit);
27</script>
28