xref: /webtrees/resources/views/edit/new-individual.phtml (revision d9efec4aaa9aefd6a527c75c15e437b9a1a6604c)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Services\GedcomEditService;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var string            $cancel_url
9 * @var GedcomEditService $gedcom_edit_service
10 * @var string            $post_url
11 * @var string            $title
12 * @var Tree              $tree
13 * @var string            $url
14 */
15
16?>
17
18<h2 class="wt-page-title"><?= $title ?></h2>
19
20<form method="post" action="<?= e($post_url) ?>">
21    <?= csrf_field() ?>
22
23    <?php foreach ($facts ?? [] as $prefix => $prefix_facts) : ?>
24        <?php foreach ($prefix_facts as $fact) : ?>
25            <div class="card mb-2">
26                <div class="card-header">
27                    <?= $fact->label() ?>
28                </div>
29                <div class="card-body pb-1">
30                    <?= view('edit/edit-gedcom-fields', ['gedcom' => $gedcom_edit_service->insertMissingFactSubtags($fact, false), 'hierarchy' => explode(':', $fact->tag()), 'tree' => $fact->record()->tree(), 'prefix' => $prefix]) ?>
31                </div>
32            </div>
33        <?php endforeach ?>
34    <?php endforeach ?>
35
36    <div class="row form-group mb-3">
37        <div class="col-sm-9 offset-sm-3">
38            <button class="btn btn-primary" type="submit" name="url" value="<?= e($url) ?>">
39                <?= view('icons/save') ?>
40                <?= /* I18N: A button label. */
41                I18N::translate('save') ?>
42            </button>
43            <button class="btn btn-primary" type="submit">
44                <?= view('icons/save') ?>
45                <?= /* I18N: A button label. */
46                I18N::translate('go to new individual') ?>
47            </button>
48            <a class="btn btn-secondary" href="<?= e($cancel_url) ?>">
49                <?= view('icons/cancel') ?>
50                <?= /* I18N: A button label. */
51                I18N::translate('cancel') ?>
52            </a>
53        </div>
54    </div>
55</form>
56
57<?= view('modals/on-screen-keyboard') ?>
58<?= view('modals/ajax') ?>
59<?= view('edit/initialize-calendar-popup') ?>
60