From 6106701c063ea2efab7dbe82bbdfc02f9eb40421 Mon Sep 17 00:00:00 2001 From: Cezar Pendarovski Date: Fri, 5 Sep 2014 09:38:54 +0200 Subject: [PATCH] Input fields get hightlighted if login fails and username is persisted --- .../templates/rest_framework/login_base.html | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index 49dad3aeb..7569c77ad 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -17,25 +17,32 @@
-
+ {% csrf_token %} -
+
- + {% if form.username.errors %} -

+

{{ form.username.errors|striptags }}

{% endif %}
-
+
- + {% if form.password.errors %} -

+

{{ form.password.errors|striptags }}

{% endif %} @@ -44,7 +51,7 @@ {% if form.non_field_errors %} {% for error in form.non_field_errors %} -
{{ error }}
+
{{ error }}
{% endfor %} {% endif %}