1<?php use Fisharebest\Webtrees\I18N; ?> 2<?php use Fisharebest\Webtrees\View; ?> 3 4<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('admin-users') => I18N::translate('User administration'), $title]]) ?> 5 6<h1><?= $title ?></h1> 7 8<form class="form-horizontal" name="newform" method="post" autocomplete="off" action="<?= e(route('admin-users-create')) ?>"> 9 <?= csrf_field() ?> 10 11 <!-- REAL NAME --> 12 <div class="row form-group"> 13 <label class="col-sm-3 col-form-label" for="real_name"> 14 <?= I18N::translate('Real name') ?> 15 </label> 16 <div class="col-sm-9"> 17 <input class="form-control" type="text" id="real_name" name="real_name" required maxlength="64" value="<?= e($real_name) ?>" dir="auto"> 18 <p class="small text-muted"> 19 <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?> 20 </p> 21 </div> 22 </div> 23 24 <!-- USER NAME --> 25 <div class="row form-group"> 26 <label class="col-sm-3 col-form-label" for="username"> 27 <?= I18N::translate('Username') ?> 28 </label> 29 <div class="col-sm-9"> 30 <input class="form-control" type="text" id="username" name="username" required maxlength="32" value="<?= e($username) ?>" dir="auto"> 31 <p class="small text-muted"> 32 <?= I18N::translate('Usernames are case-insensitive and ignore accented letters, so that “chloe”, “chloë”, and “Chloe” are considered to be the same.') ?> 33 </p> 34 </div> 35 </div> 36 37 <!-- PASSWORD --> 38 <div class="row form-group"> 39 <label class="col-sm-3 col-form-label" for="pass1"> 40 <?= I18N::translate('Password') ?> 41 </label> 42 <div class="col-sm-9"> 43 <input class="form-control" type="password" id="pass1" name="pass1" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::plural('Use at least %s character.', 'Use at least %s characters.', WT_MINIMUM_PASSWORD_LENGTH, I18N::number(WT_MINIMUM_PASSWORD_LENGTH)) ?>" required onchange="form.pass2.pattern = regex_quote(this.value);" autocomplete="new-password"> 44 <p class="small text-muted"> 45 <?= I18N::translate('Passwords must be at least 6 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?> 46 </p> 47 </div> 48 </div> 49 50 <!-- CONFIRM PASSWORD --> 51 <div class="row form-group"> 52 <label class="col-sm-3 col-form-label" for="pass2"> 53 <?= I18N::translate('Confirm password') ?> 54 </label> 55 <div class="col-sm-9"> 56 <input class="form-control" type="password" id="pass2" name="pass2" pattern = "<?= WT_REGEX_PASSWORD ?>" placeholder="<?= I18N::translate('Type the password again.') ?>" required autocomplete="new-password"> 57 </div> 58 </div> 59 60 <!-- EMAIL ADDRESS --> 61 <div class="row form-group"> 62 <label class="col-sm-3 col-form-label" for="email"> 63 <?= I18N::translate('Email address') ?> 64 </label> 65 <div class="col-sm-9"> 66 <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>"> 67 <p class="small text-muted"> 68 <?= 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.') ?> 69 </p> 70 </div> 71 </div> 72 73 <div class="row form-group"> 74 <div class="offset-sm-3 col-sm-9"> 75 <button type="submit" class="btn btn-primary"> 76 <?= I18N::translate('save') ?> 77 </button> 78 </div> 79 </div> 80</form> 81 82<?php View::push('javascript') ?> 83<script> 84 function regex_quote(str) { 85 return str.replace(/[\\.?+*()[\](){}|]/g, "\\$&"); 86 } 87</script> 88<?php View::endpush() ?> 89