login.jinja2 1.4 KB
Newer Older
Daniele Venzano's avatar
Daniele Venzano committed
1
{% extends "base.jinja2" %}
2
{% block title %}Login{% endblock %}
3 4

{% block custom_head %}
5
    <script src="{{ static_url("jquery.validate.min.js") }}" type="application/javascript"></script>
6 7
{% endblock %}

8
{% block content %}
9

10
<div id="loginbox">
11
    <img alt="ZOE logo" src="{{ static_url("logo.png") }}">
12 13 14 15
{% if error %}
    <p style="color: red;">{{ error }}</p>
{% endif %}

16
    <div id="login-form">
17
        <form action="{{ reverse_url("login") }}" method="post" id="login_form">
18 19
            <label for="username">Username:</label>
            <input autocapitalize="off" autocorrect="off" class="text-input" id="username" name="username" tabindex="1" type="text" value=""><br>
20

21 22
            <label for="password">Password:</label>
            <input class="text-input" id="password" name="password" tabindex="2" type="password" value="">
23 24

            <div id="form_btn">
25
                <button id="signin-btn" class="btn btn-blue" type="submit" name="login" value="userpass" tabindex="3">Login</button>
26
            </div>
27 28 29 30 31 32
            {% if with_gitlab_oauth %}
                Or login with:
                <div class="form_btn">
                    <button id="signin-btn-oauth" class="btn btn-blue" type="submit" name="login" value="OAUTH" tabindex="3">Eurecom GitLab</button>
                </div>
            {% endif %}
33 34 35 36
        </form>
    </div>
</div>

37 38 39 40
<script>
    $("#login_form").validate();
</script>

41
{% endblock %}