13b3db8adSGreg Roach<?php 23b3db8adSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 59db6d3cbSGreg Roachuse Fisharebest\Webtrees\Fact; 655749c76SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditFactAction; 79db6d3cbSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactPage; 83b3db8adSGreg Roachuse Fisharebest\Webtrees\I18N; 949a2c9dcSGreg Roachuse Fisharebest\Webtrees\Tree; 103b3db8adSGreg Roach 119db6d3cbSGreg Roach/** 129db6d3cbSGreg Roach * @var bool $can_edit_raw 139db6d3cbSGreg Roach * @var Fact $fact 14e22e42f7SGreg Roach * @var string $gedcom 15148eeb52SGreg Roach * @var string $hidden_url 169db6d3cbSGreg Roach * @var string $title 1749a2c9dcSGreg Roach * @var Tree $tree 1842c6a8b1SGreg Roach * @var string $url 199db6d3cbSGreg Roach */ 209db6d3cbSGreg Roach 213b3db8adSGreg Roach?> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<h2 class="wt-page-title"><?= $title ?></h2> 24dd6b2bfcSGreg Roach 2549a2c9dcSGreg Roach<form method="post" action="<?= e(route(EditFactAction::class, ['tree' => $tree->name(), 'xref' => $fact->record()->xref(), 'fact_id' => $fact->id()])) ?>" class="wt-page-content"> 26c531f071SGreg Roach <input type="hidden" name="url" value="<?= e($url) ?>"> 27dd6b2bfcSGreg Roach 28e22e42f7SGreg Roach <?= view('edit/edit-gedcom-fields', ['gedcom' => $gedcom, 'hierarchy' => explode(':', $fact->tag()), 'tree' => $fact->record()->tree(), 'prefix' => '']) ?> 29dd6b2bfcSGreg Roach 309e3c2cf9SGreg Roach <div class="row mb-3"> 31dd6b2bfcSGreg Roach <div class="col-sm-3 wt-page-options-label"> 32dd6b2bfcSGreg Roach </div> 33dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 349e3c2cf9SGreg Roach <div class="mb-3"> 354da96842SGreg Roach <?= view('components/checkbox', ['label' => I18N::translate('Keep the existing “last change” information'), 'name' => 'keep_chan', 'checked' => (bool) $tree->getPreference('NO_UPDATE_CHAN')]) ?> 364da96842SGreg Roach </div> 374da96842SGreg Roach 38dd6b2bfcSGreg Roach <button class="btn btn-primary" type="submit"> 39d993d560SGreg Roach <?= view('icons/save') ?> 40dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 41dd6b2bfcSGreg Roach I18N::translate('save') ?> 42dd6b2bfcSGreg Roach </button> 43148eeb52SGreg Roach 44fbab8125SGreg Roach <a class="btn btn-secondary" href="<?= e($url) ?>"> 45d993d560SGreg Roach <?= view('icons/cancel') ?> 46dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 47dd6b2bfcSGreg Roach I18N::translate('cancel') ?> 48dd6b2bfcSGreg Roach </a> 49148eeb52SGreg Roach 50148eeb52SGreg Roach <?php if ($hidden_url !== '') : ?> 51148eeb52SGreg Roach <a class="btn btn-link" href="<?= e($hidden_url) ?>"> 52148eeb52SGreg Roach <?= I18N::translate('Edit with all GEDCOM tags') ?> 53148eeb52SGreg Roach </a> 54148eeb52SGreg Roach <?php endif; ?> 55148eeb52SGreg Roach 56dd6b2bfcSGreg Roach <?php if ($can_edit_raw) : ?> 57c531f071SGreg Roach <a class="btn btn-link" href="<?= e(route(EditRawFactPage::class, ['xref' => $fact->record()->xref(), 'fact_id' => $fact->id(), 'tree' => $tree->name(), 'url' => $url])) ?>"> 58dd6b2bfcSGreg Roach <?= I18N::translate('Edit the raw GEDCOM') ?> 59dd6b2bfcSGreg Roach </a> 60dd6b2bfcSGreg Roach <?php endif; ?> 61dd6b2bfcSGreg Roach </div> 62dd6b2bfcSGreg Roach </div> 6381443e3cSGreg Roach 6481443e3cSGreg Roach <?= csrf_field() ?> 65dd6b2bfcSGreg Roach</form> 66dd6b2bfcSGreg Roach 67dd6b2bfcSGreg Roach<?= view('modals/on-screen-keyboard') ?> 68dd6b2bfcSGreg Roach<?= view('modals/ajax') ?> 69dd6b2bfcSGreg Roach<?= view('edit/initialize-calendar-popup') ?> 70