xref: /webtrees/resources/views/edit/link-child-to-family.phtml (revision aa27872dda4a16c6164a650a3155df6bebf99ca4)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Individual;
6use Fisharebest\Webtrees\Registry;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var Individual $individual
11 * @var string     $title
12 * @var Tree       $tree
13 * @var string     $xref
14 */
15
16?>
17
18<h2 class="wt-page-title"><?= $title ?></h2>
19
20<form method="post" action="<?= e(route(LinkChildToFamilyAction::class, ['tree' => $tree->name(), 'xref' => $xref])) ?>" class="wt-page-content">
21    <?= csrf_field() ?>
22
23    <div class="row form-group">
24        <label class="col-sm-3 col-form-label" for="famid">
25            <?= I18N::translate('Family') ?>
26        </label>
27        <div class="col-sm-9">
28            <?= view('components/select-family', ['name' => 'famid', 'tree' => $tree]) ?>
29        </div>
30    </div>
31
32    <div class="row form-group">
33        <label class="col-sm-3 col-form-label" for="PEDI">
34            <?= I18N::translate('Pedigree') ?>
35        </label>
36        <div class="col-sm-9">
37            <?= Registry::elementFactory()->make('INDI:FAMC:PEDI')->edit('PEDI', 'PEDI', '', $tree) ?>
38            <p class="small text-muted">
39                <?= I18N::translate('A child may have more than one set of parents. The relationship between the child and the parents can be biological, legal, or based on local culture and tradition. If no pedigree is specified, then a biological relationship will be assumed.') ?>
40            </p>
41        </div>
42    </div>
43
44    <div class="row form-group">
45        <div class="col-sm-9 offset-sm-3">
46            <button class="btn btn-primary" type="submit">
47                <?= view('icons/save') ?>
48                <?= /* I18N: A button label. */
49                I18N::translate('save') ?>
50            </button>
51            <a class="btn btn-secondary" href="<?= e($individual->url()) ?>">
52                <?= view('icons/cancel') ?>
53                <?= /* I18N: A button label. */
54                I18N::translate('cancel') ?>
55            </a>
56        </div>
57    </div>
58</form>
59