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