xref: /webtrees/resources/views/password-reset-page.phtml (revision 3f0247b283a74c64ac885446380ea81de9cf779e)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Tree;
6use Fisharebest\Webtrees\User;
7
8/**
9 * @var string    $title
10 * @var string    $token
11 * @var Tree|null $tree
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    <div class="row">
22        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
23            <?= I18N::translate('Username') ?>
24        </label>
25        <div class="col-sm-9 wt-page-options-value">
26            <input class="form-control" type="text" id="username" name="username" value="<?= e($user->userName()) ?>" disabled>
27        </div>
28    </div>
29
30    <div class="row">
31        <label class="col-sm-3 col-form-label wt-page-options-label" for="password">
32            <?= I18N::translate('Password') ?>
33        </label>
34        <div class="col-sm-9 wt-page-options-value">
35            <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')) ?>">
36            <div class="form-text" id="password-description">
37                <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
38            </div>
39        </div>
40    </div>
41
42    <div class="row">
43        <div class="col-sm-3 col-form-label wt-page-options-label">
44        </div>
45        <div class="col-sm-9 wt-page-options-value">
46            <button class="btn btn-primary" type="submit">
47                <?= /* I18N: A button label. */
48                I18N::translate('continue') ?>
49            </button>
50
51        </div>
52    </div>
53
54    <?= csrf_field() ?>
55</form>
56