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