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