Commit 22a56fdd by Brian Talbot

edx.org - adding in an intermediate disabled state for login/register submit…

edx.org - adding in an intermediate disabled state for login/register submit buttons when the form is first processed
parent b5ec11af
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
button[type="submit"] { button[type="submit"] {
@extend .button-primary; @extend .button-primary;
&:disabled { &:disabled, &.is-disabled {
opacity: 0.3; opacity: 0.3;
cursor: default !important; cursor: default !important;
} }
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
(function() { (function() {
$(document).delegate('#login-form', 'ajax:success', function(data, json, xhr) { $(document).delegate('#login-form', 'ajax:success', function(data, json, xhr) {
$(this).find('.form-actions #submit').addClass('is-disabled');
if(json.success) { if(json.success) {
$('.message.submission-error').removeClass('is-shown'); $('.message.submission-error').removeClass('is-shown');
toggleSubmitButton(); toggleSubmitButton();
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
(function() { (function() {
$(document).delegate('#register-form', 'ajax:success', function(data, json, xhr) { $(document).delegate('#register-form', 'ajax:success', function(data, json, xhr) {
$(this).find('.form-actions #submit').addClass('is-disabled');
if(json.success) { if(json.success) {
$('.message.submission-error').removeClass('is-shown'); $('.message.submission-error').removeClass('is-shown');
toggleSubmitButton(); toggleSubmitButton();
......
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