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

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

10
{% block content %}
11

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

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

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

            <div id="form_btn">
27
                <button id="signin-btn" class="btn btn-blue" type="submit" name="login" value="userpass" tabindex="3">Login</button>
28
            </div>
29 30 31 32 33 34
            {% 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 %}
35 36 37 38
        </form>
    </div>
</div>

39 40 41 42
<script>
    $("#login_form").validate();
</script>

43
{% endblock %}