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