xref: /webtrees/resources/views/modules/google-maps/config.phtml (revision 99c2ebaa768bfd7df48b9fc54e9134bbe9898e94)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var string $api_key
9 * @var string $title
10 */
11
12?>
13
14<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ModulesAllPage::class) => I18N::translate('Modules'), $title]]) ?>
15
16<h1><?= $title ?></h1>
17
18<form method="post">
19    <div class="row mb-3">
20        <label class="col-sm-3 col-form-label" for="api_key">
21            <?= I18N::translate('API key') ?>
22        </label>
23        <div class="col-sm-9">
24            <input
25                    class="form-control"
26                    dir="ltr"
27                    id="api_key"
28                    maxlength="255"
29                    name="api_key"
30                    type="text"
31                    value="<?= e($api_key) ?>"
32            >
33            <div class="form-text">
34                <?= I18N::translate('To use this service, you need an API key.') ?>
35                <br>
36                <?= I18N::translate('For more information, see %s.', '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key">developers.google.com/maps/documentation/javascript/get-api-key</a>') ?>
37            </div>
38        </div>
39    </div>
40
41    <button type="submit" class="btn btn-primary">
42        <?= I18N::translate('save') ?>
43    </button>
44
45    <a href="<?= route(ControlPanel::class) ?>" class="btn btn-secondary">
46        <?= view('icons/cancel') ?>
47        <?= I18N::translate('cancel') ?>
48    </a>
49
50    <?= csrf_field() ?>
51</form>
52