0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 03:31:04 +01:00

Improvements to error display

This commit is contained in:
Lucas Moeskops 2018-03-15 11:40:21 +01:00 committed by Janneke Janssen
parent 58326ef0ac
commit 6bb3605497

View File

@ -4,43 +4,46 @@
{% block bodyclass %}login{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ block.super }}
<link rel="stylesheet" href="{% static 'wagtailadmin/css/layouts/login.css' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'wagtailadmin/css/layouts/login.css' %}" type="text/css" />
{% endblock %}
{% block furniture %}
<div class="content-wrapper">
<div class="content-wrapper">
{% if form.errors %}
<div class="messages">
<ul>
<li class="error">{% trans "The passwords do not match. Please try again." %}</li>
</ul>
</div>
{% endif %}
<form method="post" novalidate>
{% csrf_token %}
<h1>{% trans "Set your new password" %}</h1>
<ul class="fields">
<li>
<div class="field">
{{ form.new_password1.label_tag }}
{{ form.new_password1 }}
</div>
</li>
<li>
<div class="field">
{{ form.new_password2.label_tag }}
{{ form.new_password2 }}
</div>
</li>
<li class="submit">
<input type="submit" value="{% trans 'Reset password' %}" class="button" />
</li>
</ul>
</form>
{% if form.errors %}
<div class="messages">
<ul>
<li class="error">{% trans 'Password reset failed. Please see the errors below.' %}</li>
</ul>
{{ form.non_field_errors }}
</div>
{% endif %}
<form method="post" novalidate>
{% csrf_token %}
<h1>{% trans "Set your new password" %}</h1>
<ul class="fields">
<li>
<div class="field">
{{ form.new_password1.label_tag }}
{{ form.new_password1 }}
{{ form.errors.new_password1 }}
</div>
</li>
<li>
<div class="field">
{{ form.new_password2.label_tag }}
{{ form.new_password2 }}
{{ form.errors.new_password2 }}
</div>
</li>
<li class="submit">
<input type="submit" value="{% trans 'Reset password' %}" class="button" />
</li>
</ul>
</form>
</div>
{% endblock %}