xref: /webtrees/resources/views/register-page.phtml (revision 81bf322104708dae4d3f2c78f87fb3e6027946a3)
14c9729fbSGreg Roach<?php
256f9a9c1SGreg Roach
310e06497SGreg Roachdeclare(strict_types=1);
410e06497SGreg Roach
556f9a9c1SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RegisterAction;
64c9729fbSGreg Roachuse Fisharebest\Webtrees\I18N;
74c9729fbSGreg Roachuse Fisharebest\Webtrees\Tree;
84c9729fbSGreg Roachuse Fisharebest\Webtrees\View;
94c9729fbSGreg Roach
104c9729fbSGreg Roach/**
11dc270d8cSGreg Roach * @var string    $captcha
124c9729fbSGreg Roach * @var string    $comments
134c9729fbSGreg Roach * @var string    $email
144c9729fbSGreg Roach * @var string    $realname
154c9729fbSGreg Roach * @var bool      $show_caution
164c9729fbSGreg Roach * @var string    $title
17dc270d8cSGreg Roach * @var Tree|null $tree
184c9729fbSGreg Roach * @var string    $username
194c9729fbSGreg Roach */
204c9729fbSGreg Roach?>
21dd6b2bfcSGreg Roach
22dd6b2bfcSGreg Roach<h2 class="wt-page-title">
23dd6b2bfcSGreg Roach    <?= $title ?>
24dd6b2bfcSGreg Roach</h2>
25dd6b2bfcSGreg Roach
26dd6b2bfcSGreg Roach<?php if ($show_caution) : ?>
27dd6b2bfcSGreg Roach    <div class="wt-register-caution">
28d446377eSGreg Roach        <?= 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>') ?>
29dd6b2bfcSGreg Roach    </div>
30dd6b2bfcSGreg Roach<?php endif ?>
31dd6b2bfcSGreg Roach
32*81bf3221SGreg Roach<form method="post" action="<?= e(route(RegisterAction::class, ['tree' => $tree?->name()])) ?>" autocomplete="off" class="wt-page-options wt-page-options-register">
3370ca9c90SGreg Roach    <?= $captcha ?>
34dd6b2bfcSGreg Roach
359e3c2cf9SGreg Roach    <div class="row">
36dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="realname">
37dd6b2bfcSGreg Roach            <?= I18N::translate('Real name') ?>
38dd6b2bfcSGreg Roach        </label>
39dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
407dca5265SGreg Roach            <input class="form-control" type="text" id="realname" name="realname" required="required" maxlength="64" value="<?= e($realname) ?>" autocomplete="name">
41315eb316SGreg Roach            <div class="form-text">
42dd6b2bfcSGreg Roach                <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?>
43315eb316SGreg Roach            </div>
44dd6b2bfcSGreg Roach        </div>
45dd6b2bfcSGreg Roach    </div>
46dd6b2bfcSGreg Roach
479e3c2cf9SGreg Roach    <div class="row">
48dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="email">
49dd6b2bfcSGreg Roach            <?= I18N::translate('Email address') ?>
50dd6b2bfcSGreg Roach        </label>
51dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
527dca5265SGreg Roach            <input class="form-control" type="email" id="email" name="email" required="required" maxlength="64" value="<?= e($email) ?>" autocomplete="email">
53315eb316SGreg Roach            <div class="form-text">
54dd6b2bfcSGreg Roach                <?= 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.') ?>
55315eb316SGreg Roach            </div>
56dd6b2bfcSGreg Roach        </div>
57dd6b2bfcSGreg Roach    </div>
58dd6b2bfcSGreg Roach
599e3c2cf9SGreg Roach    <div class="row">
60dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
61dd6b2bfcSGreg Roach            <?= I18N::translate('Username') ?>
62dd6b2bfcSGreg Roach        </label>
63dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
647dca5265SGreg Roach            <input class="form-control" type="text" id="username" name="username" required="required" maxlength="32" value="<?= e($username) ?>" autocomplete="username">
65315eb316SGreg Roach            <div class="form-text">
66dd6b2bfcSGreg Roach                <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?>
67315eb316SGreg Roach            </div>
68dd6b2bfcSGreg Roach        </div>
69dd6b2bfcSGreg Roach    </div>
70dd6b2bfcSGreg Roach
719e3c2cf9SGreg Roach    <div class="row">
72510d3f2fSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="password">
73dd6b2bfcSGreg Roach            <?= I18N::translate('Password') ?>
74dd6b2bfcSGreg Roach        </label>
75dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
76d4786c66SGreg Roach            <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')) ?>">
77315eb316SGreg Roach            <div class="form-text">
7854bcf2f0SRico Sonntag                <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
79315eb316SGreg Roach            </div>
80dd6b2bfcSGreg Roach        </div>
81dd6b2bfcSGreg Roach    </div>
82dd6b2bfcSGreg Roach
839e3c2cf9SGreg Roach    <div class="row">
843574e27dSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="comment">
85dd6b2bfcSGreg Roach            <?= I18N::translate('Comments') ?>
86dd6b2bfcSGreg Roach        </label>
87dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
88f91b88bbSGreg Roach            <textarea class="form-control" id="comments" name="comments" placeholder="<?php /* I18N: placeholder text for registration-comments field */
897dca5265SGreg Roach            I18N::translate('Explain why you are requesting an account.') ?>" rows="4" maxlength="255" dir="auto" required="required"><?= e($comments) ?></textarea>
90315eb316SGreg Roach            <div class="form-text">
91dd6b2bfcSGreg Roach                <?= 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.') ?>
92315eb316SGreg Roach            </div>
93dd6b2bfcSGreg Roach        </div>
94dd6b2bfcSGreg Roach    </div>
95dd6b2bfcSGreg Roach
969e3c2cf9SGreg Roach    <div class="row">
97dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
98dd6b2bfcSGreg Roach        </div>
99dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
100dd6b2bfcSGreg Roach            <button class="btn btn-primary">
101dd6b2bfcSGreg Roach                <?= I18N::translate('continue') ?>
102dd6b2bfcSGreg Roach            </button>
103dd6b2bfcSGreg Roach        </div>
10481443e3cSGreg Roach
10581443e3cSGreg Roach        <?= csrf_field() ?>
106dd6b2bfcSGreg Roach</form>
107dd6b2bfcSGreg Roach
108dd6b2bfcSGreg Roach<?php View::push('javascript') ?>
109dd6b2bfcSGreg Roach<script>
1104c9729fbSGreg Roach    $("#password").hideShowPassword("infer", true);
111dd6b2bfcSGreg Roach</script>
112dd6b2bfcSGreg Roach<?php View::endpush() ?>
113