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