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