From f216f5fb49b460e169ed980916076253f2b1f434 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Fri, 29 Sep 2017 19:00:26 -0400 Subject: [PATCH] Added login failed feedback --- main/templates/login.html | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/main/templates/login.html b/main/templates/login.html index 2a56b65..4a182a3 100644 --- a/main/templates/login.html +++ b/main/templates/login.html @@ -23,12 +23,25 @@ $('#register-mode').click(function() { $('#login-form').collapse('hide'); $('#register-form').collapse('show'); + $('#reset-form').collapse('hide'); }); $('#login-mode').click(function() { $('#login-form').collapse('show'); $('#register-form').collapse('hide'); + $('#reset-form').collapse('hide'); }); + + $('#forgot-password').click(function() { + $('#login-form').collapse('hide'); + $('#register-form').collapse('hide'); + $('#reset-form').collapse('show'); + }); + + {% if failed %} + $('#login-form input[name="username"]').css('border-color', '#ff0000').effect('shake'); + $('#login-form input[name="password"]').css('border-color', '#ff0000').effect('shake'); + {% endif %} }); {% endblock %} @@ -52,7 +65,10 @@ -

Register

+

Register

+ {% if failed %} +

Forgot Password

+ {% endif %}
@@ -71,7 +87,13 @@ -

Login

+

Login

+
+ +
+ {% csrf_token %} + +