summaryrefslogtreecommitdiff
path: root/app/Template/user_login.php
blob: a8e8fc1535cfa0f43bb32fd6b148a2e062b46609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<div class="form-login">

    <?php if (isset($errors['login'])): ?>
        <p class="alert alert-error"><?= Helper\escape($errors['login']) ?></p>
    <?php endif ?>

    <form method="post" action="?controller=user&amp;action=check&amp;redirect_query=<?= urlencode($redirect_query) ?>">

        <?= Helper\form_csrf() ?>

        <?= Helper\form_label(t('Username'), 'username') ?>
        <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/>

        <?= Helper\form_label(t('Password'), 'password') ?>
        <?= Helper\form_password('password', $values, $errors, array('required')) ?>

        <?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?><br/>

        <?php if (GOOGLE_AUTH): ?>
            <a href="?controller=user&amp;action=google"><?= t('Login with my Google Account') ?></a>
        <?php endif ?>

        <?php if (GITHUB_AUTH): ?>
            <a href="?controller=user&amp;action=gitHub"><?= t('Login with my GitHub Account') ?></a>
        <?php endif ?>

        <div class="form-actions">
            <input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/>
        </div>
    </form>

</div>