xref: /webtrees/resources/views/admin/site-registration.phtml (revision ad7270802ba57a28d195fc58fcc55f26458a779a)
1<?php use Fisharebest\Webtrees\Bootstrap4; ?>
2<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
3<?php use Fisharebest\Webtrees\I18N; ?>
4<?php use Fisharebest\Webtrees\Site; ?>
5
6<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?>
7
8<h1><?= $title ?></h1>
9
10<form method="post" class="form-horizontal">
11    <?= csrf_field() ?>
12
13    <!-- WELCOME_TEXT_AUTH_MODE -->
14    <div class="row form-group">
15        <label for="WELCOME_TEXT_AUTH_MODE" class="col-sm-3 col-form-label">
16            <?= /* I18N: A configuration setting */ I18N::translate('Welcome text on sign-in page') ?>
17        </label>
18        <div class="col-sm-9">
19            <?= Bootstrap4::select($registration_text_options, Site::getPreference('WELCOME_TEXT_AUTH_MODE'), ['id' => 'WELCOME_TEXT_AUTH_MODE', 'name' => 'WELCOME_TEXT_AUTH_MODE']) ?>
20            <p class="small text-muted">
21            </p>
22        </div>
23    </div>
24
25    <!-- WELCOME_TEXT_AUTH_MODE_4 -->
26    <div class="row form-group">
27        <label for="WELCOME_TEXT_AUTH_MODE_4" class="col-sm-3 col-form-label">
28            <?= /* I18N: A configuration setting */ I18N::translate('Custom welcome text') ?>
29        </label>
30        <div class="col-sm-9">
31            <textarea class="form-control" maxlength="2000" id="WELCOME_TEXT_AUTH_MODE_4" name="WELCOME_TEXT_AUTH_MODE_4" rows="4"><?= e(Site::getPreference('WELCOME_TEXT_AUTH_MODE_' . WT_LOCALE)) ?></textarea>
32            <p class="small text-muted">
33                <?= /* I18N: Help text for the "Custom welcome text" site configuration setting */ I18N::translate('To set this text for other languages, you must switch to that language, and visit this page again.') ?>
34            </p>
35        </div>
36    </div>
37
38    <!-- USE_REGISTRATION_MODULE -->
39    <fieldset class="form-group">
40        <div class="row">
41            <legend class="col-form-label col-sm-3">
42                <?= /* I18N: A configuration setting */ I18N::translate('Allow visitors to request a new user account') ?>
43            </legend>
44            <div class="col-sm-9">
45                <?= Bootstrap4::radioButtons('USE_REGISTRATION_MODULE', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('USE_REGISTRATION_MODULE'), true) ?>
46                <p class="small text-muted">
47                    <?= I18N::translate('The new user will be asked to confirm their email address before the account is created.') ?>
48                    <?= I18N::translate('Details of the new user will be sent to the genealogy contact for the corresponding family tree.') ?>
49                    <?= I18N::translate('An administrator must approve the new user account and select an access level before the user can sign in.') ?>
50                </p>
51            </div>
52        </div>
53    </fieldset>
54
55    <!-- SHOW_REGISTER_CAUTION -->
56    <fieldset class="form-group">
57        <div class="row">
58            <legend class="col-form-label col-sm-3">
59                <?= /* I18N: A configuration setting */ I18N::translate('Show acceptable use agreement on “Request a new user account” page') ?>
60            </legend>
61            <div class="col-sm-9">
62                <?= Bootstrap4::radioButtons('SHOW_REGISTER_CAUTION', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('SHOW_REGISTER_CAUTION'), true) ?>
63                <p class="small text-muted">
64                </p>
65            </div>
66        </div>
67    </fieldset>
68
69    <div class="row form-group">
70        <div class="offset-sm-3 col-sm-9">
71            <button type="submit" class="btn btn-primary">
72                <?= view('icons/save') ?>
73                <?= I18N::translate('save') ?>
74            </button>
75
76            <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary">
77                <?= view('icons/cancel') ?>
78                <?= I18N::translate('cancel') ?>
79            </a>
80        </div>
81    </div>
82</form>
83