summaryrefslogtreecommitdiff
path: root/src/application/templates/old/login.twig
blob: cbbb92953d22afe2e77fe4fd5b86d696ef912644 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{% set title = __("Log in") %}
{% set formId = "login" %}
{% set formError = getAndClearFormError(formId) %}

{% extends "base.twig" %}

{% block content %}

<hr color="silver" noshade>
<h1>{{ __("Log in") }}</h1>

{% if formError %}
    {% include "components/alert_error.twig" with { message: formError } %}
{% endif %}
<form action="{{ g.server.REQUEST_URI }}" method="post">
    <input type="hidden" name="form_id" value="{{ formId }}">

    <label for="i_username">{{ __("Username:") }}</label><br>
    <input type="text" id="i_username" name="username" value="{{ lastFormField(formId, "username") }}" required><br>
    <br>
    <label for="i_password">{{ __("Password:") }}</label><br>
    <input type="password" id="i_password" name="password" required><br>
    <br>
    <button type="submit">{{ __("Log in") }}</button>
    <a href="?_action=pwreset">{{ __("I forgot my password") }}</a>

    {% if constant("REGISTRATION_ENABLED") %}
        <br><br>
        <table border="1" bordercolor="green" cellspacing="0" cellpadding="4">
        <tr>
        <td>
        {{ __("Don't have an account? %link%Register now%/link%", {
            "link": '<a href="?_action=register">',
            "/link": '</a>',
        }) }}
        </td>
        </tr>
        </table>
    {% endif %}
</form>

{% endblock %}

{% block scripts %}
{{ parent() }}
<script type="text/javascript">
$(function() {
    $("#i_username").focus();
});
</script>
{% endblock %}