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