summaryrefslogtreecommitdiff
path: root/resources/views/modals/create-location.phtml
blob: 73b6d2e1ef8e28fcc98fcf223eb72f1e00a6183a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

use Fisharebest\Webtrees\Http\RequestHandlers\CreateLocationAction;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Tree;

/**
 * @var Tree $tree
 */

?>

<form method="post" action="<?= e(route(CreateLocationAction::class, ['tree' => $tree->name()])) ?>" id="wt-modal-form">
    <?= csrf_field() ?>

    <?= view('modals/header', ['title' => I18N::translate('Create a location')]) ?>

    <div class="modal-body">
        <?= view('modals/location-fields') ?>
    </div>

    <?= view('modals/footer-save-cancel') ?>
</form>

<script>
  document.getElementById('wt-modal-form').addEventListener('submit', webtrees.createRecordModalSubmit);
</script>