xref: /webtrees/resources/views/admin/users-create.phtml (revision ad7270802ba57a28d195fc58fcc55f26458a779a)
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="password">
40            <?= I18N::translate('Password') ?>
41        </label>
42        <div class="col-sm-9">
43            <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">
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    <!-- EMAIL ADDRESS -->
51    <div class="row form-group">
52        <label class="col-sm-3 col-form-label" for="email">
53            <?= I18N::translate('Email address') ?>
54        </label>
55        <div class="col-sm-9">
56            <input class="form-control" type="email" id="email" name="email" required maxlength="64" value="<?= e($email) ?>">
57            <p class="small text-muted">
58                <?= 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.') ?>
59            </p>
60        </div>
61    </div>
62
63    <div class="row form-group">
64        <div class="offset-sm-3 col-sm-9">
65            <button type="submit" class="btn btn-primary">
66                <?= I18N::translate('save') ?>
67            </button>
68        </div>
69    </div>
70</form>
71
72<?php View::push('javascript') ?>
73<script>
74  function regex_quote(str) {
75    return str.replace(/[\\.?+*()[\](){}|]/g, "\\$&");
76  }
77</script>
78<?php View::endpush() ?>
79