xref: /webtrees/resources/views/password-reset-page.phtml (revision d041e6d3fa63b507f566372520dcd1e303155eba)
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="row form-group">
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" 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')) ?>">
39            <div class="form-text" 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            </div>
42        </div>
43    </div>
44
45    <div class="row form-group">
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