xref: /webtrees/resources/views/admin/analytics-edit.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
6use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
7use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAnalyticsPage;
8use Fisharebest\Webtrees\I18N;
9
10/**
11 * @var string $action
12 * @var string $form_fields
13 * @var string $preview
14 * @var string $title
15 */
16
17?>
18
19<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ModulesAllPage::class) => I18N::translate('Modules'), route(ModulesAnalyticsPage::class) => I18N::translate('Tracking and analytics'), $title]]) ?>
20
21<h1><?= $title ?></h1>
22
23<form method="post" action="<?= e($action) ?>" class="form-horizontal">
24    <?= $form_fields ?>
25
26    <div class="row mb-3">
27        <label class="col-sm-3" for="preview">
28            <?= I18N::translate('Preview') ?>
29        </label>
30
31        <div class="col-sm-9">
32            <textarea id="preview" class="form-control" rows="10" dir="ltr" disabled><?= e($preview) ?></textarea>
33        </div>
34    </div>
35
36
37    <div class="row mb-3">
38        <div class="offset-sm-3 col-sm-9">
39            <button type="submit" class="btn btn-primary">
40                <?= view('icons/save') ?>
41                <?= I18N::translate('save') ?>
42            </button>
43
44            <a href="<?= e(route(ModulesAnalyticsPage::class)) ?>" class="btn btn-secondary">
45                <?= view('icons/cancel') ?>
46                <?= I18N::translate('cancel') ?>
47            </a>
48        </div>
49    </div>
50
51    <?= csrf_field() ?>
52</form>
53