diff --git a/lms/templates/login_modal.html b/lms/templates/login_modal.html index f8c1ca0caf..b13e3a2a0e 100644 --- a/lms/templates/login_modal.html +++ b/lms/templates/login_modal.html @@ -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('
Email or password is incorrect.
'); - } else { - $('#login_error').stop().css("display", "block"); - } - } - ); - }); + if(json.success) { + location.href="${reverse('dashboard')}"; + } else { + if($('#login_error').length == 0) { + $('#login_form').prepend('
Email or password is incorrect.
'); + } + $('#login_error').stop().css("display", "block"); + } + } + ); + }); })(this)