aboutsummaryrefslogtreecommitdiff
path: root/design/templates/lib/login.html
blob: de2300dc13902d72c2c35d77e74823fb6e6fbb3d (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
<h1>Login to {{site.name}}</h1>
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

{% if next %}
    {% if user.is_authenticated %}
    <p>Your account doesn't have access to this page. To proceed,
    please login with an account that has access.</p>
    {% else %}
    <p>Please login to see this page.</p>
    {% endif %}
{% endif %}

<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<fieldset>
    {{ form.username.label_tag }}
    {{ form.username }}
</fieldset>
<fieldset>
    {{ form.password.label_tag }}
    {{ form.password }}
</fieldset>

<input type="submit" class="btn sm" value="login">
<input type="hidden" name="next" value="{{ next }}">
<a href="" >Cancel</a>
</form>

{# Assumes you setup the password_reset view in your URLconf #}
<hr />
<p class="text-center">No account yet? <a href="/register/">Sign up</a>.<br>
<a href="{% url 'password_reset' %}">Forgot your password?</a></p>