8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

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.
This commit is contained in:
Alexandre Iooss 2018-09-19 22:56:54 +02:00 committed by Alexandre IOOSS
parent c20a28b15e
commit 8492b8c59b

View file

@ -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' %}">
<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>
<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 %}