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