Commit ba959152 by Matthew Mongeau

Login errors should display on first failure.

parent 171e16f1
...@@ -61,9 +61,10 @@ ...@@ -61,9 +61,10 @@
function(json) { function(json) {
if(json.success) { if(json.success) {
location.href="${reverse('dashboard')}"; location.href="${reverse('dashboard')}";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
} else { } else {
if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
}
$('#login_error').stop().css("display", "block"); $('#login_error').stop().css("display", "block");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment