xref: /webtrees/resources/views/password-reset-page.phtml (revision 94db7d2d27c3ad6a04fceebbdcb98e28e97649b3)
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    <?= csrf_field() ?>
22
23    <div class="row form-group">
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="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 form-group">
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