xref: /webtrees/resources/views/modules/faq/edit.phtml (revision 4a1f1d433794f86f893b59883147e57af4e94374)
1<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
2<?php use Fisharebest\Webtrees\I18N; ?>
3
4<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), route('module', ['module' => 'faq', 'action' => 'Admin', 'ged' => $tree->name()]) => I18N::translate('Frequently asked questions'), $title]]) ?>
5
6<h1><?= $title ?></h1>
7
8<form name="faq" class="form-horizontal" method="post">
9    <?= csrf_field() ?>
10    <input type="hidden" name="block_id" value="<?= $block_id ?>">
11
12    <div class="row form-group">
13        <label for="header" class="col-sm-3 col-form-label">
14            <?= I18N::translate('Question') ?>
15        </label>
16
17        <div class="col-sm-9">
18            <input type="text" class="form-control" name="header" id="header"
19                value="<?= e($header) ?>">
20        </div>
21    </div>
22
23    <div class="row form-group">
24        <label for="faqbody" class="col-sm-3 col-form-label">
25            <?= I18N::translate('Answer') ?>
26        </label>
27
28        <div class="col-sm-9">
29            <textarea name="faqbody" id="faqbody" class="form-control html-edit" rows="10"><?= e($faqbody) ?></textarea>
30        </div>
31    </div>
32
33    <div class="row form-group">
34        <label for="xref" class="col-sm-3 col-form-label">
35            <?= /* I18N: Label for a configuration option */
36            I18N::translate('Show this block for which languages') ?>
37        </label>
38
39        <div class="col-sm-9">
40            <?= FunctionsEdit::editLanguageCheckboxes('languages', $languages) ?>
41        </div>
42    </div>
43
44    <div class="row form-group">
45        <label for="block_order" class="col-sm-3 col-form-label">
46            <?= I18N::translate('Sort order') ?>
47        </label>
48
49        <div class="col-sm-9">
50            <input type="text" name="block_order" id="block_order" class="form-control" value="<?= $block_order ?>">
51        </div>
52    </div>
53
54    <div class="row form-group">
55        <label for="gedcom_id" class="col-sm-3 col-form-label">
56            <?= I18N::translate('Family tree') ?>
57        </label>
58
59        <div class="col-sm-9">
60            <?= view('components/select', ['name' => 'gedcom_id', 'selected' => $tree->name(), 'options' => $tree_names]) ?>
61            <p class="small text-muted">
62                <?= /* I18N: FAQ = “Frequently Asked Question” */
63                I18N::translate('An FAQ can be displayed on just one of the family trees, or on all the family trees.') ?>
64            </p>
65        </div>
66    </div>
67
68    <div class="row form-group">
69        <div class="offset-sm-3 col-sm-9">
70            <button type="submit" class="btn btn-primary">
71                <?= view('icons/save') ?>
72                <?= I18N::translate('save') ?>
73            </button>
74        </div>
75    </div>
76</form>
77