xref: /webtrees/resources/views/modules/html/config.phtml (revision 9b152ff9230017d2c03aa1bf603a98b18250446d)
1<?php
2
3use Fisharebest\Webtrees\Functions\FunctionsEdit;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\View;
6
7?>
8
9<div class="row form-group">
10    <label class="col-sm-3 col-form-label" for="title">
11        <?= I18N::translate('Title') ?>
12    </label>
13    <div class="col-sm-9">
14        <input class="form-control" type="text" id="title" name="title" value="<?= e($title) ?>">
15    </div>
16</div>
17
18<div class="row form-group">
19    <label class="col-sm-3 col-form-label" for="template">
20        <?= I18N::translate('Templates') ?>
21    </label>
22    <div class="col-sm-9">
23        <?= view('components/select', ['name' => '', 'id' => 'template', 'selected' => '', 'options' => $templates]) ?>
24        <p class="small text-muted">
25            <?= 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.') ?>
26        </p>
27    </div>
28</div>
29
30<div class="row form-group">
31    <label class="col-sm-3 col-form-label" for="html">
32        <?= I18N::translate('Content') ?>
33    </label>
34    <div class="col-sm-9">
35        <p>
36            <?= 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.') ?>
37        </p>
38        <textarea name="html" id="html" class="html-edit form-control" rows="10"><?= e($html) ?></textarea>
39    </div>
40</div>
41
42<fieldset class="form-group">
43    <div class="row">
44        <legend class="col-form-label col-sm-3">
45            <?= I18N::translate('Show the date and time of update') ?>
46        </legend>
47        <div class="col-sm-9">
48            <?= view('components/radios-inline', ['name' => 'show_timestamp', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $show_timestamp]) ?>
49        </div>
50    </div>
51</fieldset>
52
53<fieldset class="form-group">
54    <div class="row">
55        <legend class="col-form-label col-sm-3">
56            <?= I18N::translate('Show this block for which languages') ?>
57        </legend>
58        <div class="col-sm-9">
59            <?= FunctionsEdit::editLanguageCheckboxes('lang', $languages) ?>
60        </div>
61    </div>
62</fieldset>
63
64<?php View::push('javascript') ?>
65<script>
66    $("#template").change(function () {
67        this.form.html.value=this.options[this.selectedIndex].value;
68        CKEDITOR.instances.html.setData(document.getElementById("html").value);
69    });
70</script>
71<?php View::endpush() ?>
72