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