xref: /webtrees/resources/views/modules/login_block/sign-in.phtml (revision 510d3f2f742dbbb1c1c6bf2c67f577737dd49b89)
1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
2*510d3f2fSGreg Roach<?php use Fisharebest\Webtrees\View; ?>
3dd6b2bfcSGreg Roach
4dd6b2bfcSGreg Roach<form name="login-form" method="POST" action="<?= route('login', ['url' => route('user-page')]) ?>">
5dd6b2bfcSGreg Roach    <?= csrf_field() ?>
6dd6b2bfcSGreg Roach
7dd6b2bfcSGreg Roach    <div class="form-group">
8dd6b2bfcSGreg Roach        <label for="username">
9dd6b2bfcSGreg Roach            <?= I18N::translate('Username') ?>
10dd6b2bfcSGreg Roach        </label>
11dd6b2bfcSGreg Roach        <input type="text" id="username" name="username" class="form-control">
12dd6b2bfcSGreg Roach    </div>
13dd6b2bfcSGreg Roach
14dd6b2bfcSGreg Roach    <div class="form-group">
15dd6b2bfcSGreg Roach        <label for="password">
16dd6b2bfcSGreg Roach            <?= I18N::translate('Password') ?>
17dd6b2bfcSGreg Roach        </label>
18dd6b2bfcSGreg Roach        <input type="password" id="password" name="password" class="form-control" autocomplete="current-password">
19dd6b2bfcSGreg Roach    </div>
20dd6b2bfcSGreg Roach
21dd6b2bfcSGreg Roach    <div>
22dd6b2bfcSGreg Roach        <button type="submit" class="btn btn-primary">
23dd6b2bfcSGreg Roach            <?= /* I18N: A button label. */ I18N::translate('sign in') ?>
24dd6b2bfcSGreg Roach        </button>
25dd6b2bfcSGreg Roach
26dd6b2bfcSGreg Roach        <button type="button" class="btn btn-secondary" data-toggle="collapse" data-target="#forgot-password" aria-expanded="false" aria-controls="forgot-password">
27dd6b2bfcSGreg Roach            <?= I18N::translate('Forgot password?') ?>
28dd6b2bfcSGreg Roach        </button>
29dd6b2bfcSGreg Roach    </div>
30dd6b2bfcSGreg Roach</form>
31dd6b2bfcSGreg Roach
32dd6b2bfcSGreg Roach<?php if ($allow_register) : ?>
33dd6b2bfcSGreg Roach    <a class="btn btn-link" href="<?= e(route('register')) ?>">
34dd6b2bfcSGreg Roach        <?= I18N::translate('Request a new user account') ?>
35dd6b2bfcSGreg Roach    </a>
36dd6b2bfcSGreg Roach<?php endif ?>
37dd6b2bfcSGreg Roach
38dd6b2bfcSGreg Roach<div class="collapse" id="forgot-password">
39dd6b2bfcSGreg Roach    <form action="<?= e(route('login')) ?>" method="POST">
40dd6b2bfcSGreg Roach        <input type="hidden" name="time" value="">
41dd6b2bfcSGreg Roach        <input type="hidden" name="action" value="requestpw">
42dd6b2bfcSGreg Roach        <?= I18N::translate('Request a new password') ?>
43dd6b2bfcSGreg Roach        <div class="form-group">
44dd6b2bfcSGreg Roach            <label for="new_passwd_username">
45dd6b2bfcSGreg Roach                <?= I18N::translate('Username or email address') ?>
46dd6b2bfcSGreg Roach                <input type="text" id="new_passwd_username" name="new_passwd_username" class="form-control">
47dd6b2bfcSGreg Roach            </label>
48dd6b2bfcSGreg Roach        </div>
49dd6b2bfcSGreg Roach        <div>
50dd6b2bfcSGreg Roach            <button type="submit" class="btn btn-primary">
51dd6b2bfcSGreg Roach                <?= /* I18N: A button label. */ I18N::translate('continue') ?>
52dd6b2bfcSGreg Roach            </button>
53dd6b2bfcSGreg Roach        </div>
54dd6b2bfcSGreg Roach    </form>
55dd6b2bfcSGreg Roach</div>
56dd6b2bfcSGreg Roach
57*510d3f2fSGreg Roach<?php View::push('javascript') ?>
58*510d3f2fSGreg Roach<script>
59*510d3f2fSGreg Roach    $('#password').hideShowPassword('infer', true);
60*510d3f2fSGreg Roach</script>
61*510d3f2fSGreg Roach<?php View::endpush() ?>
62*510d3f2fSGreg Roach
63