diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-27 15:43:54 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-12-27 15:43:54 -0600 |
commit | 1521e2ce012a2555b06e217de2fcd8f5ac54ce87 (patch) | |
tree | 0245e47e346efc6b0a226303d42ff1ca578b0c69 | |
parent | 48b3004bfb6bd24ef34a2b8235b9c843e8fe1947 (diff) | |
download | gitlab-ce-1521e2ce012a2555b06e217de2fcd8f5ac54ce87.tar.gz |
re-enable submit button after username change failure
-rw-r--r-- | app/assets/javascripts/profile/profile.js.es6 | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/assets/javascripts/profile/profile.js.es6 b/app/assets/javascripts/profile/profile.js.es6 index eb2fe3477a2..aef2e3a3fa8 100644 --- a/app/assets/javascripts/profile/profile.js.es6 +++ b/app/assets/javascripts/profile/profile.js.es6 @@ -41,15 +41,12 @@ } beforeUpdateUsername() { - $('.loading-username').show(); - $(this).find('.update-success').hide(); - return $(this).find('.update-failed').hide(); + $('.loading-username', this).removeClass('hidden'); } afterUpdateUsername() { - $('.loading-username').hide(); - $(this).find('.btn-save').enable(); - return $(this).find('.loading-gif').hide(); + $('.loading-username', this).addClass('hidden'); + $('button[type=submit]', this).enable(); } onUpdateNotifs(e, data) { |