summaryrefslogtreecommitdiff
path: root/resources/views/admin/map-provider.phtml
blob: b03969eb55a8bef3ec96daeb13e8749f225cf774 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php

use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
use Fisharebest\Webtrees\Http\RequestHandlers\MapProviderAction;
use Fisharebest\Webtrees\I18N;

/**
 * @var string $geonames
 * @var string $provider
 * @var string $title
 */

?>

<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>

<form method="post" action="<?= e(route(MapProviderAction::class)) ?>">
    <?= csrf_field() ?>

    <div class="form-group">
        <div class="form-row">
            <label class="col-form-label col-sm-3" for="provider-default">
                <?= I18N::translate('Map provider') ?>
            </label>
            <div class="col-sm-9">
                <?= view('components/radios', ['name' => 'provider', 'selected' => $provider, 'options' => [
                ''    => I18N::translate('Do not use maps'),
                'osm' => I18N::translate('OpenStreetMap™'),
                ]]) ?>
            </div>
        </div>
    </div>

    <hr>

    <div class="row form-group">
        <label class="col-sm-3 col-form-label" for="geonames">
            <?= I18N::translate('Use the GeoNames database for autocomplete on places') ?>
        </label>
        <div class="col-sm-9">
            <input
            class="form-control"
            dir="ltr"
            id="geonames"
            maxlength="255"
            name="geonames"
            type="text"
            value="<?= e($geonames) ?>"
            >
            <p class="small text-muted">
                <?= /* I18N: Help text for the “Use GeoNames database for autocomplete on places” configuration setting */ I18N::translate('The website www.geonames.org provides a large database of place names. This can be searched when entering new places. To use this feature, you must register for a free account at www.geonames.org and provide the username.') ?>
            </p>
        </div>
    </div>

    <hr>

    <div class="form-group row">
        <div class="offset-sm-3 col-sm-9">
            <button type="submit" class="btn btn-primary">
                <?= view('icons/save') ?>
                <?= I18N::translate('save') ?>
            </button>
        </div>
    </div>
</form>