xref: /webtrees/resources/views/edit/link-child-to-family.phtml (revision 2cf1b3d738df97008ab3c3a92d5939c02a4598a7)
1<?php
2
3use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;
4use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyAction;
5use Fisharebest\Webtrees\I18N;
6
7?>
8
9<h2 class="wt-page-title"><?= $title ?></h2>
10
11<form method="post" action="<?= e(route(LinkChildToFamilyAction::class, ['tree' => $tree->name(), 'xref' => $xref])) ?>" class="wt-page-content">
12    <?= csrf_field() ?>
13
14    <div class="row form-group">
15        <label class="col-sm-3 col-form-label" for="famid">
16            <?= I18N::translate('Family') ?>
17        </label>
18        <div class="col-sm-9">
19            <?= view('components/select-family', ['name' => 'famid', 'tree' => $tree]) ?>
20        </div>
21    </div>
22
23    <div class="row form-group">
24        <label class="col-sm-3 col-form-label" for="PEDI">
25            <?= I18N::translate('Pedigree') ?>
26        </label>
27        <div class="col-sm-9">
28            <?= view('components/select', ['name' => 'PEDI', 'selected' => '', 'options' => GedcomCodePedi::getValues($individual)]) ?>
29            <p class="small text-muted">
30                <?= 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.') ?>
31            </p>
32        </div>
33    </div>
34
35    <div class="row form-group">
36        <div class="col-sm-9 offset-sm-3">
37            <button class="btn btn-primary" type="submit">
38                <?= view('icons/save') ?>
39                <?= /* I18N: A button label. */
40                I18N::translate('save') ?>
41            </button>
42            <a class="btn btn-secondary" href="<?= e($individual->url()) ?>">
43                <?= view('icons/cancel') ?>
44                <?= /* I18N: A button label. */
45                I18N::translate('cancel') ?>
46            </a>
47        </div>
48    </div>
49</form>
50