xref: /webtrees/resources/views/edit/link-child-to-family.phtml (revision 81443e3cbe4eef5ccdcf8dae716a7e35f7417b60)
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    <div class="row mb-3">
22        <label class="col-sm-3 col-form-label" for="famid">
23            <?= I18N::translate('Family') ?>
24        </label>
25        <div class="col-sm-9">
26            <?= view('components/select-family', ['name' => 'famid', 'tree' => $tree]) ?>
27        </div>
28    </div>
29
30    <div class="row mb-3">
31        <label class="col-sm-3 col-form-label" for="PEDI">
32            <?= Registry::elementFactory()->make('INDI:FAMC:PEDI')->label() ?>
33        </label>
34        <div class="col-sm-9">
35            <?= Registry::elementFactory()->make('INDI:FAMC:PEDI')->edit('PEDI', 'PEDI', '', $tree) ?>
36            <div class="form-text">
37                <?= 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.') ?>
38            </div>
39        </div>
40    </div>
41
42    <div class="row mb-3">
43        <div class="col-sm-9 offset-sm-3">
44            <button class="btn btn-primary" type="submit">
45                <?= view('icons/save') ?>
46                <?= /* I18N: A button label. */
47                I18N::translate('save') ?>
48            </button>
49            <a class="btn btn-secondary" href="<?= e($individual->url()) ?>">
50                <?= view('icons/cancel') ?>
51                <?= /* I18N: A button label. */
52                I18N::translate('cancel') ?>
53            </a>
54        </div>
55    </div>
56
57    <?= csrf_field() ?>
58</form>
59