xref: /webtrees/resources/views/modules/html/config.phtml (revision 39bf58ec4f6ee376d8220b1f9245633654efc5bf)
1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Bootstrap4; ?>
2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
3dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
4dd6b2bfcSGreg Roach
5dd6b2bfcSGreg Roach<div class="row form-group">
6dd6b2bfcSGreg Roach    <label class="col-sm-3 col-form-label" for="title">
7dd6b2bfcSGreg Roach        <?= I18N::translate('Title') ?>
8dd6b2bfcSGreg Roach    </label>
9dd6b2bfcSGreg Roach    <div class="col-sm-9">
10dd6b2bfcSGreg Roach        <input class="form-control" type="text" id="title" name="title" value="<?= e($title) ?>">
11dd6b2bfcSGreg Roach    </div>
12dd6b2bfcSGreg Roach</div>
13dd6b2bfcSGreg Roach
14dd6b2bfcSGreg Roach<div class="row form-group">
15dd6b2bfcSGreg Roach    <label class="col-sm-3 col-form-label" for="template">
16dd6b2bfcSGreg Roach        <?= I18N::translate('Templates') ?>
17dd6b2bfcSGreg Roach    </label>
18dd6b2bfcSGreg Roach    <div class="col-sm-9">
19dd6b2bfcSGreg Roach        <?= 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']) ?>
20dd6b2bfcSGreg Roach        <p class="small text-muted">
21dd6b2bfcSGreg Roach            <?= 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.') ?>
22dd6b2bfcSGreg Roach        </p>
23dd6b2bfcSGreg Roach    </div>
24dd6b2bfcSGreg Roach</div>
25dd6b2bfcSGreg Roach
26dd6b2bfcSGreg Roach<div class="row form-group">
27dd6b2bfcSGreg Roach    <label class="col-sm-3 col-form-label" for="html">
28dd6b2bfcSGreg Roach        <?= I18N::translate('Content') ?>
29dd6b2bfcSGreg Roach    </label>
30dd6b2bfcSGreg Roach    <div class="col-sm-9">
31dd6b2bfcSGreg Roach        <p>
32dd6b2bfcSGreg Roach            <?= 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.') ?>
33dd6b2bfcSGreg Roach        </p>
34dd6b2bfcSGreg Roach        <textarea name="html" id="html" class="html-edit form-control" rows="10"><?= e($html) ?></textarea>
35dd6b2bfcSGreg Roach    </div>
36dd6b2bfcSGreg Roach</div>
37dd6b2bfcSGreg Roach
38dd6b2bfcSGreg Roach<fieldset class="form-group">
39dd6b2bfcSGreg Roach    <div class="row">
40*39bf58ecSGreg Roach        <legend class="col-form-label col-sm-3">
41dd6b2bfcSGreg Roach            <?= I18N::translate('Show the date and time of update') ?>
42dd6b2bfcSGreg Roach        </legend>
43dd6b2bfcSGreg Roach        <div class="col-sm-9">
44dd6b2bfcSGreg Roach            <?= Bootstrap4::radioButtons('show_timestamp', FunctionsEdit::optionsNoYes(), $show_timestamp, true) ?>
45dd6b2bfcSGreg Roach        </div>
46dd6b2bfcSGreg Roach    </div>
47dd6b2bfcSGreg Roach</fieldset>
48dd6b2bfcSGreg Roach
49dd6b2bfcSGreg Roach<fieldset class="form-group">
50dd6b2bfcSGreg Roach    <div class="row">
51*39bf58ecSGreg Roach        <legend class="col-form-label col-sm-3">
52dd6b2bfcSGreg Roach            <?= I18N::translate('Show this block for which languages') ?>
53dd6b2bfcSGreg Roach        </legend>
54dd6b2bfcSGreg Roach        <div class="col-sm-9">
55dd6b2bfcSGreg Roach            <?= FunctionsEdit::editLanguageCheckboxes('lang', $languages) ?>
56dd6b2bfcSGreg Roach        </div>
57dd6b2bfcSGreg Roach    </div>
58dd6b2bfcSGreg Roach</fieldset>
59dd6b2bfcSGreg Roach
60dd6b2bfcSGreg Roach<?= view('modules/ckeditor/ckeditor-js') ?>
61