summaryrefslogtreecommitdiff
path: root/resources/views/admin/site-registration.phtml
blob: 646e766a95f5d717d2210719c894ff0f293959c7 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php

use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
use Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationAction;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Site;

/**
 * @var string        $language_tag
 * @var array<string> $registration_text_options
 * @var string        $title
 */

?>

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

<h1><?= $title ?></h1>

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

    <!-- WELCOME_TEXT_AUTH_MODE -->
    <div class="row mb-3">
        <label for="WELCOME_TEXT_AUTH_MODE" class="col-sm-3 col-form-label">
            <?= /* I18N: A configuration setting */ I18N::translate('Welcome text on sign-in page') ?>
        </label>
        <div class="col-sm-9">
            <?= view('components/select', ['name' => 'WELCOME_TEXT_AUTH_MODE', 'selected' => Site::getPreference('WELCOME_TEXT_AUTH_MODE'), 'options' => $registration_text_options]) ?>
            <div class="form-text">
            </div>
        </div>
    </div>

    <!-- WELCOME_TEXT_AUTH_MODE_4 -->
    <div class="row mb-3">
        <label for="WELCOME_TEXT_AUTH_MODE_4" class="col-sm-3 col-form-label">
            <?= /* I18N: A configuration setting */ I18N::translate('Custom welcome text') ?>
        </label>
        <div class="col-sm-9">
            <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>
            <div class="form-text">
                <?= /* 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.') ?>
            </div>
        </div>
    </div>

    <!-- USE_REGISTRATION_MODULE -->
    <fieldset class="row mb-3">
        <legend class="col-form-label col-sm-3">
            <?= /* I18N: A configuration setting */ I18N::translate('Allow visitors to request a new user account') ?>
        </legend>
        <div class="col-sm-9">
            <?= view('components/radios-inline', ['name' => 'USE_REGISTRATION_MODULE', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) Site::getPreference('USE_REGISTRATION_MODULE')]) ?>
            <div class="form-text">
                <?= I18N::translate('The new user will be asked to confirm their email address before the account is created.') ?>
                <?= I18N::translate('Details of the new user will be sent to the genealogy contact for the corresponding family tree.') ?>
                <?= I18N::translate('An administrator must approve the new user account and select an access level before the user can sign in.') ?>
            </div>
        </div>
    </fieldset>

    <!-- SHOW_REGISTER_CAUTION -->
    <fieldset class="row mb-3">
        <legend class="col-form-label col-sm-3">
            <?= /* I18N: A configuration setting */ I18N::translate('Show acceptable use agreement on “Request a new user account” page') ?>
        </legend>
        <div class="col-sm-9">
            <?= view('components/radios-inline', ['name' => 'SHOW_REGISTER_CAUTION', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) Site::getPreference('SHOW_REGISTER_CAUTION')]) ?>
            <div class="form-text">
            </div>
        </div>
    </fieldset>

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

            <a href="<?= e(route(ControlPanel::class)) ?>" class="btn btn-secondary">
                <?= view('icons/cancel') ?>
                <?= I18N::translate('cancel') ?>
            </a>
        </div>
    </div>
</form>