diff --git a/lms/templates/login.html b/lms/templates/login.html index 3be504d9fa..aa2f5181cd 100644 --- a/lms/templates/login.html +++ b/lms/templates/login.html @@ -35,6 +35,7 @@ (function() { $(document).delegate('#login-form', 'ajax:success', function(data, json, xhr) { if(json.success) { + $('.message.submission-error').removeClass('is-shown'); var u=decodeURI(window.location.search); next=u.split("next=")[1] if (next) { @@ -42,7 +43,10 @@ } else { location.href="${reverse('dashboard')}"; } - } + } else { + $('.message.submission-error').addClass('is-shown'); + $('.message.submission-error .message-copy').html(json.value); + } }); })(this) diff --git a/lms/templates/register.html b/lms/templates/register.html index d36cc8464c..3cd543fb90 100644 --- a/lms/templates/register.html +++ b/lms/templates/register.html @@ -61,21 +61,7 @@ - - - -

@@ -242,8 +228,9 @@ if(json.success) { location.href="${reverse('dashboard')}"; } else { + $('.status.message.submission-error').addClass('is-shown'); + $('.status.message.submission-error .message-copy').html(json.value).stop().css("display", "block"); $(".field-error").removeClass('field-error'); - $('#register_error').html(json.value).stop().css("display", "block"); $("[data-field='"+json.field+"']").addClass('field-error') } });