From 22a56fddb4705de86180ba59b249b4854dff617a Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Wed, 10 Apr 2013 13:38:25 -0400 Subject: [PATCH] edx.org - adding in an intermediate disabled state for login/register submit buttons when the form is first processed --- lms/static/sass/multicourse/_account.scss | 2 +- lms/templates/login.html | 2 ++ lms/templates/register.html | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/static/sass/multicourse/_account.scss b/lms/static/sass/multicourse/_account.scss index 5e1965ae43..eab8cbe66b 100644 --- a/lms/static/sass/multicourse/_account.scss +++ b/lms/static/sass/multicourse/_account.scss @@ -391,7 +391,7 @@ button[type="submit"] { @extend .button-primary; - &:disabled { + &:disabled, &.is-disabled { opacity: 0.3; cursor: default !important; } diff --git a/lms/templates/login.html b/lms/templates/login.html index 8290743418..2e0281f4f6 100644 --- a/lms/templates/login.html +++ b/lms/templates/login.html @@ -30,6 +30,8 @@ (function() { $(document).delegate('#login-form', 'ajax:success', function(data, json, xhr) { + $(this).find('.form-actions #submit').addClass('is-disabled'); + if(json.success) { $('.message.submission-error').removeClass('is-shown'); toggleSubmitButton(); diff --git a/lms/templates/register.html b/lms/templates/register.html index 7e79f420e6..ee06a3caa0 100644 --- a/lms/templates/register.html +++ b/lms/templates/register.html @@ -36,6 +36,8 @@ (function() { $(document).delegate('#register-form', 'ajax:success', function(data, json, xhr) { + $(this).find('.form-actions #submit').addClass('is-disabled'); + if(json.success) { $('.message.submission-error').removeClass('is-shown'); toggleSubmitButton();