xref: /webtrees/resources/views/edit/raw-gedcom-fact.phtml (revision 982d76d1b4590434f05cfe991ff00da5ddb290de)
1<?php use Fisharebest\Webtrees\I18N; ?>
2
3<h2 class="wt-page-title"><?= $title ?></h2>
4
5<form class="wt-page-content" method="post">
6    <?= csrf_field() ?>
7    <input type="hidden" name="ged" value="<?= e($fact->record()->tree()->name()) ?>">
8    <input type="hidden" name="xref" value="<?= e($fact->record()->xref()) ?>">
9    <input type="hidden" name="fact_id" value="<?= e($fact->id()) ?>">
10
11
12    <p class="text-muted small">
13        <?= 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.') ?>
14    </p>
15    <p class="text-muted small">
16        <?= /* 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>') ?>
17    </p>
18
19    <div class="card my-2">
20        <label class="card-header py-1 px-2 d-flex" for="gedcom">
21            <?= $fact->summary() ?>
22        </label>
23        <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->gedcom()) ?>"><?= e($fact->gedcom()) ?></textarea>
24    </div>
25
26    <div class="row form-group">
27        <div class="col-sm-9 offset-sm-3">
28            <button class="btn btn-primary" type="submit">
29                <?= view('icons/save') ?>
30                <?= /* I18N: A button label. */ I18N::translate('save') ?>
31            </button>
32            <a class="btn btn-secondary" href="<?= e($fact->record()->url()) ?>">
33                <?= view('icons/cancel') ?>
34                <?= /* I18N: A button label. */ I18N::translate('cancel') ?>
35            </a>
36        </div>
37    </div>
38</form>
39
40