xref: /webtrees/resources/views/login-page.phtml (revision 1f1ffa65b3b51df2b95b5c68894525436855964a)
1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
2510d3f2fSGreg Roach<?php use Fisharebest\Webtrees\View; ?>
3dd6b2bfcSGreg Roach
4dd6b2bfcSGreg Roach<?php if ($error) : ?>
5dd6b2bfcSGreg Roach    <div class="alert alert-danger">
6dd6b2bfcSGreg Roach        <?= $error ?>
7dd6b2bfcSGreg Roach    </div>
8dd6b2bfcSGreg Roach<?php endif ?>
9dd6b2bfcSGreg Roach
10dd6b2bfcSGreg Roach<h2 class="wt-page-title">
11dd6b2bfcSGreg Roach    <?= I18N::translate('Welcome to this genealogy website') ?>
12dd6b2bfcSGreg Roach</h2>
13dd6b2bfcSGreg Roach
14dd6b2bfcSGreg Roach<p>
15dd6b2bfcSGreg Roach    <?= nl2br($welcome, false) ?>
16dd6b2bfcSGreg Roach</p>
17dd6b2bfcSGreg Roach
18dd6b2bfcSGreg Roach<form action="<?= e(route('login')) ?>" class="wt-page-options wt-page-options-login" method="post">
19dd6b2bfcSGreg Roach    <?= csrf_field() ?>
20dd6b2bfcSGreg Roach    <input type="hidden" name="url" value="<?= e($url) ?>">
21dd6b2bfcSGreg Roach
22dd6b2bfcSGreg Roach    <div class="form-group row">
23dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="username">
24dd6b2bfcSGreg Roach            <?= I18N::translate('Username') ?>
25dd6b2bfcSGreg Roach        </label>
26dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
27*1f1ffa65SGreg Roach            <input class="form-control" type="text" id="username" name="username" required value="<?= e($username) ?>" autocomplete="username">
28dd6b2bfcSGreg Roach        </div>
29dd6b2bfcSGreg Roach    </div>
30dd6b2bfcSGreg Roach
31dd6b2bfcSGreg Roach    <div class="form-group row">
32dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="password">
33dd6b2bfcSGreg Roach            <?= I18N::translate('Password') ?>
34dd6b2bfcSGreg Roach        </label>
35dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
36dd6b2bfcSGreg Roach            <input autocomplete="current-password" class="form-control" id="password" name="password" required type="password">
37dd6b2bfcSGreg Roach        </div>
38dd6b2bfcSGreg Roach    </div>
39dd6b2bfcSGreg Roach
40dd6b2bfcSGreg Roach    <div class="form-group row">
41dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
42dd6b2bfcSGreg Roach        </div>
43dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
44dd6b2bfcSGreg Roach            <button class="btn btn-primary" type="submit">
45dd6b2bfcSGreg Roach                <?= /* I18N: A button label. */ I18N::translate('sign in') ?>
46dd6b2bfcSGreg Roach            </button>
47dd6b2bfcSGreg Roach            <!--
48dd6b2bfcSGreg Roach            Emails are sent from a TREE, not from a SITE. Therefore if there is no
49dd6b2bfcSGreg Roach            tree available (initial setup or all trees private), then we can't send email.
50dd6b2bfcSGreg Roach            -->
51dd6b2bfcSGreg Roach            <?php if ($tree) : ?>
52dd6b2bfcSGreg Roach                <a class="btn btn-link" href="<?= e(route('forgot-password')) ?>">
53dd6b2bfcSGreg Roach                    <?= I18N::translate('Forgot password?') ?>
54dd6b2bfcSGreg Roach                </a>
55dd6b2bfcSGreg Roach
56dd6b2bfcSGreg Roach                <?php if ($can_register) : ?>
57dd6b2bfcSGreg Roach                    <a class="btn btn-link" href="<?= e(route('register')) ?>">
58dd6b2bfcSGreg Roach                        <?= I18N::translate('Request a new user account') ?>
59dd6b2bfcSGreg Roach                    </a>
60dd6b2bfcSGreg Roach                <?php endif ?>
61dd6b2bfcSGreg Roach            <?php endif ?>
62dd6b2bfcSGreg Roach        </div>
63dd6b2bfcSGreg Roach    </div>
64dd6b2bfcSGreg Roach</form>
65510d3f2fSGreg Roach
66510d3f2fSGreg Roach<?php View::push('javascript') ?>
67510d3f2fSGreg Roach<script>
68510d3f2fSGreg Roach    $('#password').hideShowPassword('infer', true);
69510d3f2fSGreg Roach</script>
70510d3f2fSGreg Roach<?php View::endpush() ?>
71