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