login.html 1.65 KB
Newer Older
Thom Wiggers's avatar
Thom Wiggers committed
1
2
{% extends "base.html" %}
{% load i18n %}
Joost Rijneveld's avatar
Joost Rijneveld committed
3
4
5

{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}

Thom Wiggers's avatar
Thom Wiggers committed
6
{% block title %}{% trans "Login" %}{% endblock %}
7

Thom Wiggers's avatar
Thom Wiggers committed
8
{% block body %}
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
<h1>{% trans "Log in" %}</h1>
{% if next %}
<p>
{% if user.is_authenticated %}
{% blocktrans trimmed %}
Your account does not have access to this page. To proceed, please log in with an account that has access.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
Please log in to see this page.
{% endblocktrans %}
{% endif %}
</p>
{% endif %}

{% if form.errors %}
<div class="alert alert-error">
    {% trans "Invalid username or password." %}
    <button type="button" class="close"><span class="alert-icon-close"></span></button>
</div>
{% endif %}

<div class="row">
        <form method="post" action="{% url 'login' %}" class="span6 offset3 form-horizontal">
            {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}">

            <div class="control-group">
                <input name="{{ form.username.name }}" autofocus class="form-control" placeholder="{% trans "Username" %}">
            </div>

            <div class="control-group">
                <input name="{{ form.password.name }}" class="form-control" type="password" placeholder="{% trans "Password" %}">
            </div>

            <div class="control-group">
                <input type="submit" value="{% trans "Login" %}" class="btn btn-primary btn-style1 pull-right login">
                <a href="{% url 'password_reset' %}" class="forgot btn pull-left btn-style2">{% trans "Forgot password" %}</a>
            </div>
        </form>
    </div>
Thom Wiggers's avatar
Thom Wiggers committed
50
{% endblock %}