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