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