xref: /webtrees/resources/views/modules/custom-css-js/edit.phtml (revision 1ff45046fabc22237b5d0d8e489c96f031fc598d)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
6use Fisharebest\Webtrees\I18N;
7
8/**
9 * @var string $body
10 * @var string $head
11 * @var string $title
12 */
13
14?>
15
16<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
17
18<h1><?= $title ?></h1>
19
20<form method="post">
21    <div class="row mb-3">
22        <label for="head" class="col-sm-3 col-form-label">
23            <?= I18N::translate('Add content to the end of the <code>&lt;head&gt;</code> element.') ?>
24        </label>
25        <div class="col-sm-9">
26            <textarea id="head" name="head" class="form-control font-monospace" dir="ltr" rows="5"><?= e($head) ?></textarea>
27            <p class="text-muted">
28                <?= I18N::translate('Include the <code>&lt;style&gt;&lt;/style&gt;</code> tags.') ?>
29            </p>
30        </div>
31    </div>
32
33    <div class="row mb-3">
34        <label for="body" class="col-sm-3 col-form-label">
35            <?= I18N::translate('Add content to the end of the <code>&lt;body&gt;</code> element.') ?>
36        </label>
37        <div class="col-sm-9">
38            <textarea id="body" name="body" class="form-control font-monospace" dir="ltr" rows="5"><?= e($body) ?></textarea>
39            <p class="text-muted">
40                <?= I18N::translate('Include the <code>&lt;script&gt;&lt;/script&gt;</code> tags.') ?>
41            </p>
42        </div>
43    </div>
44
45    <button type="submit" class="btn btn-primary">
46        <?= view('icons/save') ?>
47        <?= I18N::translate('save') ?>
48    </button>
49
50    <a href="<?= route(ControlPanel::class) ?>" class="btn btn-secondary">
51        <?= view('icons/cancel') ?>
52        <?= I18N::translate('cancel') ?>
53    </a>
54
55    <?= csrf_field() ?>
56</form>
57