1<?php 2 3declare(strict_types=1); 4 5use Fisharebest\Webtrees\Http\RequestHandlers\RegisterAction; 6use Fisharebest\Webtrees\I18N; 7use Fisharebest\Webtrees\Tree; 8use Fisharebest\Webtrees\View; 9 10/** 11 * @var string $captcha 12 * @var string $comments 13 * @var string $email 14 * @var string $realname 15 * @var bool $show_caution 16 * @var string $title 17 * @var Tree|null $tree 18 * @var string $username 19 */ 20?> 21 22<h2 class="wt-page-title"> 23 <?= $title ?> 24</h2> 25 26<?php if ($show_caution) : ?> 27 <div class="wt-register-caution"> 28 <?= 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>') ?> 29 </div> 30<?php endif ?> 31 32<form method="post" action="<?= e(route(RegisterAction::class, ['tree' => $tree?->name()])) ?>" autocomplete="off" class="wt-page-options wt-page-options-register"> 33 <?= $captcha ?> 34 35 <div class="row"> 36 <label class="col-sm-3 col-form-label wt-page-options-label" for="realname"> 37 <?= I18N::translate('Real name') ?> 38 </label> 39 <div class="col-sm-9 wt-page-options-value"> 40 <input class="form-control" type="text" id="realname" name="realname" required="required" maxlength="64" value="<?= e($realname) ?>" autocomplete="name"> 41 <div class="form-text"> 42 <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> 43 </div> 44 </div> 45 </div> 46 47 <div class="row"> 48 <label class="col-sm-3 col-form-label wt-page-options-label" for="email"> 49 <?= I18N::translate('Email address') ?> 50 </label> 51 <div class="col-sm-9 wt-page-options-value"> 52 <input class="form-control" type="email" id="email" name="email" required="required" maxlength="64" value="<?= e($email) ?>" autocomplete="email"> 53 <div class="form-text"> 54 <?= 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.') ?> 55 </div> 56 </div> 57 </div> 58 59 <div class="row"> 60 <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> 61 <?= I18N::translate('Username') ?> 62 </label> 63 <div class="col-sm-9 wt-page-options-value"> 64 <input class="form-control" type="text" id="username" name="username" required="required" maxlength="32" value="<?= e($username) ?>" autocomplete="username"> 65 <div class="form-text"> 66 <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> 67 </div> 68 </div> 69 </div> 70 71 <div class="row"> 72 <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> 73 <?= I18N::translate('Password') ?> 74 </label> 75 <div class="col-sm-9 wt-page-options-value"> 76 <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')) ?>"> 77 <div class="form-text"> 78 <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> 79 </div> 80 </div> 81 </div> 82 83 <div class="row"> 84 <label class="col-sm-3 col-form-label wt-page-options-label" for="comment"> 85 <?= I18N::translate('Comments') ?> 86 </label> 87 <div class="col-sm-9 wt-page-options-value"> 88 <textarea class="form-control" id="comments" name="comments" placeholder="<?php /* I18N: placeholder text for registration-comments field */ 89 I18N::translate('Explain why you are requesting an account.') ?>" rows="4" maxlength="255" dir="auto" required="required"><?= e($comments) ?></textarea> 90 <div class="form-text"> 91 <?= 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.') ?> 92 </div> 93 </div> 94 </div> 95 96 <div class="row"> 97 <div class="col-sm-3 col-form-label wt-page-options-label"> 98 </div> 99 <div class="col-sm-9 wt-page-options-value"> 100 <button class="btn btn-primary"> 101 <?= I18N::translate('continue') ?> 102 </button> 103 </div> 104 105 <?= csrf_field() ?> 106</form> 107 108<?php View::push('javascript') ?> 109<script> 110 $("#password").hideShowPassword("infer", true); 111</script> 112<?php View::endpush() ?> 113