xref: /webtrees/resources/views/password-reset-page.phtml (revision b9a4a6c608ac9f9f3bf6c12fbe1fbe871f30fedb)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Tree;
8use Fisharebest\Webtrees\User;
9
10/**
11 * @var string    $title
12 * @var string    $token
13 * @var Tree|null $tree
14 * @var User      $user
15 */
16?>
17
18<h2 class="wt-page-title">
19    <?= $title ?>
20</h2>
21
22<form method="post" action="<?= e(route(PasswordResetAction::class, ['token' => $token, 'tree' => $tree?->name()])) ?>" class="wt-page-options wt-page-options-login">
23    <div class="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">
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="required" data-wt-show-password-text="<?= e(I18N::translate('show')) ?>" data-wt-show-password-title="<?= e(I18N::translate('Show password')) ?>" data-wt-hide-password-text="<?= e(I18N::translate('hide')) ?>" data-wt-hide-password-title="<?= e(I18N::translate('Hide password')) ?>">
38            <div class="form-text" 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            </div>
41        </div>
42    </div>
43
44    <div class="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
56    <?= csrf_field() ?>
57</form>
58