Merge pull request #192 from MITx/mm-login-errors-display
Login errors should display on first failure.
This commit is contained in:
@@ -59,15 +59,16 @@
|
||||
postJSON('/login',
|
||||
submit_data,
|
||||
function(json) {
|
||||
if(json.success) {
|
||||
location.href="${reverse('dashboard')}";
|
||||
} else if($('#login_error').length == 0) {
|
||||
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
|
||||
} else {
|
||||
$('#login_error').stop().css("display", "block");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
if(json.success) {
|
||||
location.href="${reverse('dashboard')}";
|
||||
} 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");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
})(this)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user