xref: /webtrees/resources/views/register-page.phtml (revision 110955ce4d5f4a9363f95eb7a771dd91c079b974)
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('<div class="largeError">Notice:</div><div class="error">By completing and submitting this form, you agree:<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></div>') ?>
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="form-group row">
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            <p class="small text-muted">
41                <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?>
42            </p>
43        </div>
44    </div>
45
46    <div class="form-group row">
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            <p class="small text-muted">
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            </p>
55        </div>
56    </div>
57
58    <div class="form-group row">
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            <p class="small text-muted">
65                <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?>
66            </p>
67        </div>
68    </div>
69
70    <div class="form-group row">
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-show-text="<?= e(I18N::translate('show')) ?>" data-show-title="<?= e(I18N::translate('Show password')) ?>" data-hide-text="<?= e(I18N::translate('hide')) ?>" data-hide-title="<?= e(I18N::translate('Hide password')) ?>">
76            <p class="small text-muted">
77                <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
78            </p>
79        </div>
80    </div>
81
82    <div class="form-group row">
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="comment" name="comment" 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            <p class="small text-muted">
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            </p>
92        </div>
93    </div>
94
95    <div class="form-group row">
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