xref: /webtrees/resources/views/password-reset-page.phtml (revision 81bf322104708dae4d3f2c78f87fb3e6027946a3)
1a00bcc63SGreg Roach<?php
2a00bcc63SGreg Roach
310e06497SGreg Roachdeclare(strict_types=1);
410e06497SGreg Roach
556f9a9c1SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
6a00bcc63SGreg Roachuse Fisharebest\Webtrees\I18N;
7f917a287SGreg Roachuse Fisharebest\Webtrees\Tree;
8a00bcc63SGreg Roachuse Fisharebest\Webtrees\User;
9a00bcc63SGreg Roach
10a00bcc63SGreg Roach/**
11a00bcc63SGreg Roach * @var string    $title
12a00bcc63SGreg Roach * @var string    $token
13dc270d8cSGreg Roach * @var Tree|null $tree
14a00bcc63SGreg Roach * @var User      $user
15a00bcc63SGreg Roach */
16a00bcc63SGreg Roach?>
17a00bcc63SGreg Roach
18a00bcc63SGreg Roach<h2 class="wt-page-title">
19a00bcc63SGreg Roach    <?= $title ?>
20a00bcc63SGreg Roach</h2>
21a00bcc63SGreg Roach
22*81bf3221SGreg Roach<form method="post" action="<?= e(route(PasswordResetAction::class, ['token' => $token, 'tree' => $tree?->name()])) ?>" class="wt-page-options wt-page-options-login">
239e3c2cf9SGreg Roach    <div class="row">
24a00bcc63SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
25a00bcc63SGreg Roach            <?= I18N::translate('Username') ?>
26a00bcc63SGreg Roach        </label>
27a00bcc63SGreg Roach        <div class="col-sm-9 wt-page-options-value">
28a00bcc63SGreg Roach            <input class="form-control" type="text" id="username" name="username" value="<?= e($user->userName()) ?>" disabled>
29a00bcc63SGreg Roach        </div>
30a00bcc63SGreg Roach    </div>
31a00bcc63SGreg Roach
329e3c2cf9SGreg Roach    <div class="row">
33a00bcc63SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="password">
34a00bcc63SGreg Roach            <?= I18N::translate('Password') ?>
35a00bcc63SGreg Roach        </label>
36a00bcc63SGreg Roach        <div class="col-sm-9 wt-page-options-value">
37d4786c66SGreg Roach            <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')) ?>">
38315eb316SGreg Roach            <div class="form-text" id="password-description">
39a00bcc63SGreg Roach                <?= I18N::translate('Passwords must be at least 8 characters long and are case-sensitive, so that “secret” is different from “SECRET”.') ?>
40315eb316SGreg Roach            </div>
41a00bcc63SGreg Roach        </div>
42a00bcc63SGreg Roach    </div>
43a00bcc63SGreg Roach
449e3c2cf9SGreg Roach    <div class="row">
45a00bcc63SGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
46a00bcc63SGreg Roach        </div>
47a00bcc63SGreg Roach        <div class="col-sm-9 wt-page-options-value">
48a00bcc63SGreg Roach            <button class="btn btn-primary" type="submit">
49a00bcc63SGreg Roach                <?= /* I18N: A button label. */
50a00bcc63SGreg Roach                I18N::translate('continue') ?>
51a00bcc63SGreg Roach            </button>
52a00bcc63SGreg Roach
53a00bcc63SGreg Roach        </div>
54a00bcc63SGreg Roach    </div>
5581443e3cSGreg Roach
5681443e3cSGreg Roach    <?= csrf_field() ?>
57a00bcc63SGreg Roach</form>
58