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