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