mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +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:
parent
c20a28b15e
commit
8492b8c59b
1 changed files with 8 additions and 24 deletions
|
@ -24,33 +24,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}{% trans "Log in" %}{% endblock %}
|
{% block title %}{% trans "Log in" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<form method="post" action="{% url 'login' %}">
|
||||||
{% if form.errors %}
|
{% csrf_token %}
|
||||||
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
|
{% bootstrap_form form %}
|
||||||
{% endif %}
|
<button class="btn btn-success" type="submit"><span
|
||||||
|
class="glyphicon glyphicon-log-in"></span> {% trans "Log in" %}</button>
|
||||||
{% if next %}
|
</form>
|
||||||
{% if user.is_authenticated %}
|
<p><a class="btn btn-warning btn-sm" role="button"
|
||||||
<p>{% trans "Your account doesn't have access to this page. To proceed,
|
href="{% url 'users:reset-password' %}"> {% trans "Forgotten password?" %}</a></p>
|
||||||
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>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue