summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-12-29 19:38:29 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2016-12-29 19:38:29 +0000
commit713a1e283346dd98c14f362bdff4712ca8f6d67d (patch)
tree3758bf64ba233d8a523fde01d25048a1974e5896
parent23fc1f666cf62b21485b216bbd86a10637a98d6c (diff)
parent0321c86b922b07a5ad7f5ecee1f6e69a336579eb (diff)
downloadgitlab-ce-713a1e283346dd98c14f362bdff4712ca8f6d67d.tar.gz
Merge branch '25829-update-username-button-remains-disabled-upon-failure' into 'master'
Re-enable submit button after username change failure Closes #25829 See merge request !8332
-rw-r--r--app/assets/javascripts/profile/profile.js.es69
-rw-r--r--changelogs/unreleased/25829-update-username-button-remains-disabled-upon-failure.yml4
2 files changed, 7 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) {
diff --git a/changelogs/unreleased/25829-update-username-button-remains-disabled-upon-failure.yml b/changelogs/unreleased/25829-update-username-button-remains-disabled-upon-failure.yml
new file mode 100644
index 00000000000..c82bacd8bcd
--- /dev/null
+++ b/changelogs/unreleased/25829-update-username-button-remains-disabled-upon-failure.yml
@@ -0,0 +1,4 @@
+---
+title: re-enable change username button after failure
+merge_request: 8332
+author: