Commit 8492b8c5 authored by Alexandre Iooss's avatar Alexandre Iooss Committed by Alexandre IOOSS

Remove "next" in login template

The next field isn't used at all so this removes the associated dead code.
Also it removes the double error messages when an error occures in the form.
parent c20a28b1
......@@ -24,33 +24,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endcomment %}
{% load bootstrap3 %}
{% load i18n %}
{% block title %}{% trans "Log in" %}{% endblock %}
{% block content %}
{% if form.errors %}
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<p>{% trans "Your account doesn't have access to this page. To proceed,
please log in with an account that has access." %}</p>
{% else %}
<p>{% trans "Please log in to see this page." %}</p>
{% endif %}
{% endif %}
<p><form method="post" action="{% url 'login' %}">
{% csrf_token %}
{% bootstrap_form form %}
<button class="btn btn-success" type="submit"><span class="glyphicon glyphicon-log-in"></span> {% trans "Log in" %}</button>
<input type="hidden" name="next" value="{{ next }}" />
</form></p>
<p><a class="btn btn-warning btn-sm" role="button" href="{% url 'users:reset-password' %}"> {% trans "Forgotten password?" %}</a></p>
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
{% bootstrap_form form %}
<button class="btn btn-success" type="submit"><span
class="glyphicon glyphicon-log-in"></span> {% trans "Log in" %}</button>
</form>
<p><a class="btn btn-warning btn-sm" role="button"
href="{% url 'users:reset-password' %}"> {% trans "Forgotten password?" %}</a></p>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment