xref: /webtrees/resources/views/password-reset-page.phtml (revision ba1d7494e9648df5a87aaa3fece3e098e5ce26b1)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\User;
6use Fisharebest\Webtrees\View;
7
8/**
9 * @var string $title
10 * @var string $token
11 * @var User   $user
12 */
13?>
14
15<h2 class="wt-page-title">
16    <?= $title ?>
17</h2>
18
19<form method="post" action="<?= e(route(PasswordResetAction::class)) ?>" class="wt-page-options wt-page-options-login"">
20    <?= csrf_field() ?>
21    <input type="hidden" name="token" value="<?= e($token) ?>">
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