summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-12-27 15:43:54 -0600
committerMike Greiling <mike@pixelcog.com>2016-12-27 15:43:54 -0600
commit1521e2ce012a2555b06e217de2fcd8f5ac54ce87 (patch)
tree0245e47e346efc6b0a226303d42ff1ca578b0c69
parent48b3004bfb6bd24ef34a2b8235b9c843e8fe1947 (diff)
downloadgitlab-ce-1521e2ce012a2555b06e217de2fcd8f5ac54ce87.tar.gz
re-enable submit button after username change failure
-rw-r--r--app/assets/javascripts/profile/profile.js.es69
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) {