xref: /webtrees/resources/views/register-page.phtml (revision aa6f03bb51be5a55a78fe8aed18753116689a6d3)
1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\View; ?>
3dd6b2bfcSGreg Roach
4dd6b2bfcSGreg Roach<h2 class="wt-page-title">
5dd6b2bfcSGreg Roach    <?= $title ?>
6dd6b2bfcSGreg Roach</h2>
7dd6b2bfcSGreg Roach
8dd6b2bfcSGreg Roach<?php if ($show_caution) : ?>
9dd6b2bfcSGreg Roach    <div class="wt-register-caution">
10dd6b2bfcSGreg Roach        <?= 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>') ?>
11dd6b2bfcSGreg Roach    </div>
12dd6b2bfcSGreg Roach<?php endif ?>
13dd6b2bfcSGreg Roach
14dd6b2bfcSGreg Roach<form autocomplete="off" class="wt-page-options wt-page-options-register" method="post" action="<?= e(route('register')) ?>">
15dd6b2bfcSGreg Roach    <?= csrf_field() ?>
16*aa6f03bbSGreg Roach    <input name="ged" type="hidden" value="<?= e($tree->name()) ?>">
17dd6b2bfcSGreg Roach
18dd6b2bfcSGreg Roach    <div class="form-group row">
19dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="realname">
20dd6b2bfcSGreg Roach            <?= I18N::translate('Real name') ?>
21dd6b2bfcSGreg Roach        </label>
22dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
23dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="realname" name="realname" required maxlength="64" value="<?= e($realname) ?>">
24dd6b2bfcSGreg Roach            <p class="small text-muted">
25dd6b2bfcSGreg Roach                <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?>
26dd6b2bfcSGreg Roach            </p>
27dd6b2bfcSGreg Roach        </div>
28dd6b2bfcSGreg Roach    </div>
29dd6b2bfcSGreg Roach
30dd6b2bfcSGreg Roach    <div class="form-group row">
31dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="email">
32dd6b2bfcSGreg Roach            <?= I18N::translate('Email address') ?>
33dd6b2bfcSGreg Roach        </label>
34dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
35dd6b2bfcSGreg Roach            <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>">
36dd6b2bfcSGreg Roach            <p class="small text-muted">
37dd6b2bfcSGreg 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.') ?>
38dd6b2bfcSGreg Roach            </p>
39dd6b2bfcSGreg Roach        </div>
40dd6b2bfcSGreg Roach    </div>
41dd6b2bfcSGreg Roach
42dd6b2bfcSGreg Roach    <div class="form-group row">
43dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
44dd6b2bfcSGreg Roach            <?= I18N::translate('Username') ?>
45dd6b2bfcSGreg Roach        </label>
46dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
47dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($username) ?>" autocomplete="username">
48dd6b2bfcSGreg Roach            <p class="small text-muted">
49dd6b2bfcSGreg Roach                <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?>
50dd6b2bfcSGreg Roach            </p>
51dd6b2bfcSGreg Roach        </div>
52dd6b2bfcSGreg Roach    </div>
53dd6b2bfcSGreg Roach
54dd6b2bfcSGreg Roach    <div class="form-group row">
55dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="password1">
56dd6b2bfcSGreg Roach            <?= I18N::translate('Password') ?>
57dd6b2bfcSGreg Roach        </label>
58dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
59dd6b2bfcSGreg Roach            <input class="form-control" type="password" id="password1" name="password1" placeholder="<?= /* I18N: placeholder text for new-password field */ I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" pattern="<?=  WT_REGEX_PASSWORD ?>" onchange="document.getElementById('password2').pattern = regex_quote(this.value);" required>
60dd6b2bfcSGreg Roach            <p class="small text-muted">
61dd6b2bfcSGreg Roach                <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
62dd6b2bfcSGreg Roach            </p>
63dd6b2bfcSGreg Roach        </div>
64dd6b2bfcSGreg Roach    </div>
65dd6b2bfcSGreg Roach
66dd6b2bfcSGreg Roach    <div class="form-group row">
67dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="password2">
68dd6b2bfcSGreg Roach            <?= I18N::translate('Confirm password') ?>
69dd6b2bfcSGreg Roach        </label>
70dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
71dd6b2bfcSGreg Roach            <input class="form-control" required type="password" id="password2" name="password2" placeholder="<?= /* I18N: placeholder text for repeat-password field */ I18N::translate('Type the password again.') ?>" pattern="<?= WT_REGEX_PASSWORD ?>">
72dd6b2bfcSGreg Roach            <p class="small text-muted">
73dd6b2bfcSGreg Roach                <?= I18N::translate('Type your password again, to make sure you have typed it correctly.') ?>
74dd6b2bfcSGreg Roach            </p>
75dd6b2bfcSGreg Roach        </div>
76dd6b2bfcSGreg Roach    </div>
77dd6b2bfcSGreg Roach
78dd6b2bfcSGreg Roach    <div class="form-group row">
79dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="comments">
80dd6b2bfcSGreg Roach            <?= I18N::translate('Comments') ?>
81dd6b2bfcSGreg Roach        </label>
82dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
83dd6b2bfcSGreg Roach            <textarea class="form-control" required rows="4" id="comments" name="comments" placeholder="<?php /* I18N: placeholder text for registration-comments field */ I18N::translate('Explain why you are requesting an account.') ?>"><?= e($comments) ?></textarea>
84dd6b2bfcSGreg Roach            <p class="small text-muted">
85dd6b2bfcSGreg 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.') ?>
86dd6b2bfcSGreg Roach            </p>
87dd6b2bfcSGreg Roach        </div>
88dd6b2bfcSGreg Roach    </div>
89dd6b2bfcSGreg Roach
90dd6b2bfcSGreg Roach    <div class="form-group row">
91dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
92dd6b2bfcSGreg Roach        </div>
93dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
94dd6b2bfcSGreg Roach        <button class="btn btn-primary">
95dd6b2bfcSGreg Roach            <?= I18N::translate('continue') ?>
96dd6b2bfcSGreg Roach        </button>
97dd6b2bfcSGreg Roach    </div>
98dd6b2bfcSGreg Roach</form>
99dd6b2bfcSGreg Roach
100dd6b2bfcSGreg Roach
101dd6b2bfcSGreg Roach<?php View::push('javascript') ?>
102dd6b2bfcSGreg Roach<script>
103dd6b2bfcSGreg Roach  function regex_quote(str) {
104dd6b2bfcSGreg Roach    return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
105dd6b2bfcSGreg Roach  }
106dd6b2bfcSGreg Roach</script>
107dd6b2bfcSGreg Roach<?php View::endpush() ?>
108