xref: /webtrees/resources/views/admin/site-preferences.phtml (revision b8fc901f205cd6af65496b916bf63547a3065a2f)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Site;
6
7?>
8
9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
10
11<h1><?= $title ?></h1>
12
13<form method="post" action="<?= e(route('admin-site-preferences-update')) ?>" class="form-horizontal">
14    <?= csrf_field() ?>
15
16    <!-- INDEX_DIRECTORY -->
17    <div class="row form-group">
18        <label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label">
19            <?= /* I18N: A configuration setting */
20            I18N::translate('Data folder') ?>
21        </label>
22        <div class="col-sm-9">
23            <input type="text" class="form-control" dir="ltr" id="INDEX_DIRECTORY" name="INDEX_DIRECTORY" value="<?= e(Site::getPreference('INDEX_DIRECTORY')) ?>" maxlength="255" placeholder="data/" required>
24            <p class="small text-muted">
25                <?= /* I18N: Help text for the "Data folder" site configuration setting */
26                I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?>
27            </p>
28            <p class="small text-muted">
29                <?= /* I18N: “Apache” is a software program. */
30                I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?>
31            </p>
32            <p class="small text-muted">
33                <?= I18N::translate('If you select a different folder, you must also move all files (except config.ini.php, index.php, and .htaccess) from the existing folder to the new folder.') ?>
34            </p>
35            <p class="small text-muted">
36                <?= I18N::translate('The folder can be specified in full (e.g. /home/user_name/webtrees_data/) or relative to the installation folder (e.g. ../../webtrees_data/).') ?>
37            </p>
38        </div>
39    </div>
40
41    <!-- TIMEZONE -->
42    <div class="row form-group">
43        <label for="TIMEZONE" class="col-sm-3 col-form-label">
44            <?= I18N::translate('Time zone') ?>
45        </label>
46        <div class="col-sm-9">
47            <?= view('components/select', ['name' => 'TIMEZONE', 'selected' => Site::getPreference('TIMEZONE', 'UTC'), 'options' => array_combine(DateTimeZone::listIdentifiers(), DateTimeZone::listIdentifiers())]) ?>
48            <p class="small text-muted">
49                <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?>
50            </p>
51        </div>
52    </div>
53
54    <!-- THEME_DIR -->
55    <div class="row form-group">
56        <label for="THEME_DIR" class="col-sm-3 col-form-label">
57            <?= /* I18N: A configuration setting */
58            I18N::translate('Default theme') ?>
59        </label>
60        <div class="col-sm-9">
61            <?= view('components/select', ['name' => 'THEME_DIR', 'selected' => Site::getPreference('THEME_DIR', 'webtrees'), 'options' => $all_themes]) ?>
62            <p class="small text-muted">
63                <?= /* I18N: Help text for the "Default theme" site configuration setting */
64                I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
65            </p>
66        </div>
67    </div>
68
69    <!-- ALLOW_CHANGE_GEDCOM -->
70    <fieldset class="form-group">
71        <div class="row">
72            <legend class="col-form-label col-sm-3">
73                <?= /* I18N: A configuration setting */
74                I18N::translate('Show list of family trees') ?>
75            </legend>
76            <div class="col-sm-9">
77                <?= view('components/radios-inline', ['name' => 'ALLOW_CHANGE_GEDCOM', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) Site::getPreference('ALLOW_CHANGE_GEDCOM')]) ?>
78                <p class="small text-muted">
79                    <?= /* I18N: Help text for the “Show list of family trees” site configuration setting */
80                    I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?>
81                </p>
82            </div>
83        </div>
84    </fieldset>
85
86    <div class="row form-group">
87        <div class="offset-sm-3 col-sm-9">
88            <button type="submit" class="btn btn-primary">
89                <?= view('icons/save') ?>
90                <?= I18N::translate('save') ?>
91            </button>
92
93            <a href="<?= e(route(ControlPanel::class)) ?>" class="btn btn-secondary">
94                <?= view('icons/cancel') ?>
95                <?= I18N::translate('cancel') ?>
96            </a>
97        </div>
98    </div>
99</form>
100