xref: /webtrees/resources/views/edit/raw-gedcom-fact.phtml (revision c09358794665832df009408551d8543ccb6e3783)
1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\FontAwesome; ?>
2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
3dd6b2bfcSGreg Roach
4dd6b2bfcSGreg Roach<h2 class="wt-page-title"><?= $title ?></h2>
5dd6b2bfcSGreg Roach
6dd6b2bfcSGreg Roach<form class="wt-page-content" method="post">
7dd6b2bfcSGreg Roach    <?= csrf_field() ?>
8aa6f03bbSGreg Roach    <input type="hidden" name="ged" value="<?= e($fact->record()->getTree()->name()) ?>">
9*c0935879SGreg Roach    <input type="hidden" name="xref" value="<?= e($fact->record()->xref()) ?>">
10dd6b2bfcSGreg Roach    <input type="hidden" name="fact_id" value="<?= e($fact->getFactId()) ?>">
11dd6b2bfcSGreg Roach
12dd6b2bfcSGreg Roach
13dd6b2bfcSGreg Roach    <p class="text-muted small">
14dd6b2bfcSGreg Roach        <?= I18N::translate('This page allows you to bypass the usual forms, and edit the underlying data directly. It is an advanced option, and you should not use it unless you understand the GEDCOM format. If you make a mistake here, it can be difficult to fix.') ?>
15dd6b2bfcSGreg Roach    </p>
16dd6b2bfcSGreg Roach    <p class="text-muted small">
17dd6b2bfcSGreg Roach        <?= /* I18N: %s is a URL */ I18N::translate('You can download a copy of the GEDCOM specification from %s.', '<a href="https://wiki.webtrees.net/w/images-en/Ged551-5.pdf">https://wiki.webtrees.net/w/images-en/Ged551-5.pdf</a>') ?>
18dd6b2bfcSGreg Roach    </p>
19dd6b2bfcSGreg Roach
20dd6b2bfcSGreg Roach    <div class="card my-2">
21dd6b2bfcSGreg Roach        <label class="card-header py-1 px-2 d-flex" for="gedcom">
22dd6b2bfcSGreg Roach            <?= $fact->summary() ?>
23dd6b2bfcSGreg Roach        </label>
24dd6b2bfcSGreg Roach        <textarea class="card-body form-control py-1 px-2" dir="ltr" id="gedcom" name="gedcom" pattern="<?= e($pattern) ?>" rows="<?= 5 + preg_match_all('/\n/', $fact->getGedcom()) ?>"><?= e($fact->getGedcom()) ?></textarea>
25dd6b2bfcSGreg Roach    </div>
26dd6b2bfcSGreg Roach
27dd6b2bfcSGreg Roach    <div class="row form-group">
28dd6b2bfcSGreg Roach        <div class="col-sm-9 offset-sm-3">
29dd6b2bfcSGreg Roach            <button class="btn btn-primary" type="submit">
30dd6b2bfcSGreg Roach                <?= FontAwesome::decorativeIcon('save') ?>
31dd6b2bfcSGreg Roach                <?= /* I18N: A button label. */ I18N::translate('save') ?>
32dd6b2bfcSGreg Roach            </button>
33e7766c08SGreg Roach            <a class="btn btn-secondary" href="<?= e($fact->record()->url()) ?>">
34dd6b2bfcSGreg Roach                <?= FontAwesome::decorativeIcon('cancel') ?>
35dd6b2bfcSGreg Roach                <?= /* I18N: A button label. */ I18N::translate('cancel') ?>
36dd6b2bfcSGreg Roach            </a>
37dd6b2bfcSGreg Roach        </div>
38dd6b2bfcSGreg Roach    </div>
39dd6b2bfcSGreg Roach</form>
40dd6b2bfcSGreg Roach
41