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