xref: /webtrees/resources/views/register-page.phtml (revision 89950eb4a8b302be0915d2ba9885d70db994abd6)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\RegisterAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Tree;
6use Fisharebest\Webtrees\View;
7
8/**
9 * @var string    $captcha
10 * @var string    $comments
11 * @var string    $email
12 * @var string    $realname
13 * @var bool      $show_caution
14 * @var string    $title
15 * @var Tree|null $tree
16 * @var string    $username
17 */
18?>
19
20<h2 class="wt-page-title">
21    <?= $title ?>
22</h2>
23
24<?php if ($show_caution) : ?>
25    <div class="wt-register-caution">
26        <?= I18N::translate('<p>Notice: By completing and submitting this form, you agree:</p><ul><li>to protect the privacy of living individuals listed on our site;</li><li>and in the text box below, to explain to whom you are related, or to provide us with information on someone who should be listed on our website.</li></ul>') ?>
27    </div>
28<?php endif ?>
29
30<form method="post" action="<?= e(route(RegisterAction::class, ['tree' => $tree instanceof Tree ? $tree->name() : null])) ?>" autocomplete="off" class="wt-page-options wt-page-options-register">
31    <?= csrf_field() ?>
32    <?= $captcha ?>
33
34    <div class="row form-group">
35        <label class="col-sm-3 col-form-label wt-page-options-label" for="realname">
36            <?= I18N::translate('Real name') ?>
37        </label>
38        <div class="col-sm-9 wt-page-options-value">
39            <input class="form-control" type="text" id="realname" name="realname" required="required" maxlength="64" value="<?= e($realname) ?>" autocomplete="name">
40            <div class="form-text">
41                <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?>
42            </div>
43        </div>
44    </div>
45
46    <div class="row form-group">
47        <label class="col-sm-3 col-form-label wt-page-options-label" for="email">
48            <?= I18N::translate('Email address') ?>
49        </label>
50        <div class="col-sm-9 wt-page-options-value">
51            <input class="form-control" type="email" id="email" name="email" required="required" maxlength="64" value="<?= e($email) ?>" autocomplete="email">
52            <div class="form-text">
53                <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?>
54            </div>
55        </div>
56    </div>
57
58    <div class="row form-group">
59        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
60            <?= I18N::translate('Username') ?>
61        </label>
62        <div class="col-sm-9 wt-page-options-value">
63            <input class="form-control" type="text" id="username" name="username" required="required" maxlength="32" value="<?= e($username) ?>" autocomplete="username">
64            <div class="form-text">
65                <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?>
66            </div>
67        </div>
68    </div>
69
70    <div class="row form-group">
71        <label class="col-sm-3 col-form-label wt-page-options-label" for="password">
72            <?= I18N::translate('Password') ?>
73        </label>
74        <div class="col-sm-9 wt-page-options-value">
75            <input class="form-control" type="password" id="password" name="password" placeholder="<?= /* I18N: placeholder text for new-password field */ I18N::plural('Use at least %s character.', 'Use at least %s characters.', 8, I18N::number(8)) ?>" pattern=".{8,}" required="required" autocomplete="new-password" data-wt-show-password-text="<?= e(I18N::translate('show')) ?>" data-wt-show-password-title="<?= e(I18N::translate('Show password')) ?>" data-wt-hide-password-text="<?= e(I18N::translate('hide')) ?>" data-wt-hide-password-title="<?= e(I18N::translate('Hide password')) ?>">
76            <div class="form-text">
77                <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
78            </div>
79        </div>
80    </div>
81
82    <div class="row form-group">
83        <label class="col-sm-3 col-form-label wt-page-options-label" for="comment">
84            <?= I18N::translate('Comments') ?>
85        </label>
86        <div class="col-sm-9 wt-page-options-value">
87            <textarea class="form-control" id="comments" name="comments" placeholder="<?php /* I18N: placeholder text for registration-comments field */
88            I18N::translate('Explain why you are requesting an account.') ?>" rows="4" maxlength="255" dir="auto" required="required"><?= e($comments) ?></textarea>
89            <div class="form-text">
90                <?= I18N::translate('Use this field to tell the site administrator why you are requesting an account and how you are related to the genealogy displayed on this site. You can also use this to enter any other comments you may have for the site administrator.') ?>
91            </div>
92        </div>
93    </div>
94
95    <div class="row form-group">
96        <div class="col-sm-3 col-form-label wt-page-options-label">
97        </div>
98        <div class="col-sm-9 wt-page-options-value">
99            <button class="btn btn-primary">
100                <?= I18N::translate('continue') ?>
101            </button>
102        </div>
103</form>
104
105<?php View::push('javascript') ?>
106<script>
107    $("#password").hideShowPassword("infer", true);
108</script>
109<?php View::endpush() ?>
110