xref: /webtrees/resources/views/password-reset-page.phtml (revision b8fc901f205cd6af65496b916bf63547a3065a2f)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Tree;
6use Fisharebest\Webtrees\User;
7use Fisharebest\Webtrees\View;
8
9/**
10 * @var string $title
11 * @var string $token
12 * @var User   $user
13 */
14?>
15
16<h2 class="wt-page-title">
17    <?= $title ?>
18</h2>
19
20<form method="post" action="<?= e(route(PasswordResetAction::class, ['token' => $token, 'tree' => $tree instanceof Tree ? $tree->name() : null])) ?>" class="wt-page-options wt-page-options-login"">
21    <?= csrf_field() ?>
22
23    <div class="form-group row">
24        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
25            <?= I18N::translate('Username') ?>
26        </label>
27        <div class="col-sm-9 wt-page-options-value">
28            <input class="form-control" type="text" id="username" name="username" value="<?= e($user->userName()) ?>" disabled>
29        </div>
30    </div>
31
32    <div class="row form-group">
33        <label class="col-sm-3 col-form-label wt-page-options-label" for="password">
34            <?= I18N::translate('Password') ?>
35        </label>
36        <div class="col-sm-9 wt-page-options-value">
37            <input class="form-control" type="password" id="password" name="password" autocomplete="new-password" pattern=".{8,}" required>
38            <p class="small text-muted" id="password-description">
39                <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
40            </p>
41        </div>
42    </div>
43
44    <div class="form-group row">
45        <div class="col-sm-3 col-form-label wt-page-options-label">
46        </div>
47        <div class="col-sm-9 wt-page-options-value">
48            <button class="btn btn-primary" type="submit">
49                <?= /* I18N: A button label. */
50                I18N::translate('continue') ?>
51            </button>
52
53        </div>
54    </div>
55</form>
56
57<?php View::push('javascript') ?>
58<script>
59    $("#password").hideShowPassword("infer", true);
60</script>
61<?php View::endpush() ?>
62