xref: /webtrees/resources/views/modules/html/config.phtml (revision 5703d1ae5966a5567605edc850c26ddd54062657)
1<?php use Fisharebest\Webtrees\Bootstrap4; ?>
2<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
3<?php use Fisharebest\Webtrees\I18N; ?>
4
5<div class="row form-group">
6    <label class="col-sm-3 col-form-label" for="title">
7        <?= I18N::translate('Title') ?>
8    </label>
9    <div class="col-sm-9">
10        <input class="form-control" type="text" id="title" name="title" value="<?= e($title) ?>">
11    </div>
12</div>
13
14<div class="row form-group">
15    <label class="col-sm-3 col-form-label" for="template">
16        <?= I18N::translate('Templates') ?>
17    </label>
18    <div class="col-sm-9">
19        <?= Bootstrap4::select([$html => I18N::translate('Custom')] + array_flip($templates), '', ['onchange' => 'this.form.html.value=this.options[this.selectedIndex].value; CKEDITOR.instances.html.setData(document.getElementById("html").value);', 'id' => 'template']) ?>
20        <p class="small text-muted">
21            <?= I18N::translate('To assist you in getting started with this block, we have created several standard templates. When you select one of these templates, the text area will contain a copy that you can then alter to suit your site’s requirements.') ?>
22        </p>
23    </div>
24</div>
25
26<div class="row form-group">
27    <label class="col-sm-3 col-form-label" for="html">
28        <?= I18N::translate('Content') ?>
29    </label>
30    <div class="col-sm-9">
31        <p>
32            <?= I18N::translate('As well as using the toolbar to apply HTML formatting, you can insert database fields which are updated automatically. These special fields are marked with <b>#</b> characters. For example <b>#totalFamilies#</b> will be replaced with the actual number of families in the database. Advanced users may wish to apply CSS classes to their text, so that the formatting matches the currently selected theme.') ?>
33        </p>
34        <textarea name="html" id="html" class="html-edit form-control" rows="10"><?= e($html) ?></textarea>
35    </div>
36</div>
37
38<fieldset class="form-group">
39    <div class="row">
40        <legend class="col-form-label col-sm-3">
41            <?= I18N::translate('Show the date and time of update') ?>
42        </legend>
43        <div class="col-sm-9">
44            <?= Bootstrap4::radioButtons('show_timestamp', FunctionsEdit::optionsNoYes(), $show_timestamp, true) ?>
45        </div>
46    </div>
47</fieldset>
48
49<fieldset class="form-group">
50    <div class="row">
51        <legend class="col-form-label col-sm-3">
52            <?= I18N::translate('Show this block for which languages') ?>
53        </legend>
54        <div class="col-sm-9">
55            <?= FunctionsEdit::editLanguageCheckboxes('lang', $languages) ?>
56        </div>
57    </div>
58</fieldset>
59