1<?php 2 3use Fisharebest\Webtrees\GedcomRecord; 4use Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage; 5use Fisharebest\Webtrees\Http\RequestHandlers\EditRecordAction; 6use Fisharebest\Webtrees\I18N; 7use Fisharebest\Webtrees\Tree; 8 9/** 10 * @var bool $can_edit_raw 11 * @var bool $has_chan 12 * @var GedcomRecord $record 13 * @var string $title 14 * @var Tree $tree 15 */ 16 17?> 18 19<h2 class="wt-page-title"><?= $title ?></h2> 20 21<form method="post" action="<?= e(route(EditRecordAction::class, ['tree' => $tree->name(), 'xref' => $record->xref()])) ?>" class="wt-page-content"> 22 <?= csrf_field() ?> 23 24 <?= view('edit/edit-gedcom-fields', ['gedcom' => $record->insertMissingSubtags(false), 'hierarchy' => [$record->tag()], 'tree' => $tree, 'prefix' => '']) ?> 25 26 <div class="form-group row"> 27 <div class="col-sm-3 wt-page-options-label"> 28 </div> 29 <div class="col-sm-9 wt-page-options-value"> 30 <?php if ($has_chan): ?> 31 <div class="form-group"> 32 <?= view('components/checkbox', ['label' => I18N::translate('Keep the existing “last change” information'), 'name' => 'keep_chan', 'checked' => (bool) $tree->getPreference('NO_UPDATE_CHAN')]) ?> 33 </div> 34 <?php endif ?> 35 36 <button class="btn btn-primary" type="submit"> 37 <?= view('icons/save') ?> 38 <?= /* I18N: A button label. */ 39 I18N::translate('save') ?> 40 </button> 41 42 <a class="btn btn-secondary" href="<?= e($record->url()) ?>"> 43 <?= view('icons/cancel') ?> 44 <?= /* I18N: A button label. */ 45 I18N::translate('cancel') ?> 46 </a> 47 48 <?php if ($can_edit_raw) : ?> 49 <a class="btn btn-link" href="<?= e(route(EditRawRecordPage::class, ['xref' => $record->xref(), 'tree' => $tree->name()])) ?>"> 50 <?= I18N::translate('Edit the raw GEDCOM') ?> 51 </a> 52 <?php endif; ?> 53 </div> 54 </div> 55</form> 56 57<?= view('modals/on-screen-keyboard') ?> 58<?= view('modals/ajax') ?> 59<?= view('edit/initialize-calendar-popup') ?> 60