Skip to content

Commit 35021eb

Browse files
committed
Disable dialog confirm button while waiting for server response
Fixes: QTQAINFRA-3021 Change-Id: Ifed366908973691f1b04e95b25970ae88451e98a Reviewed-by: Kari Oikarinen <[email protected]>
1 parent 5868d36 commit 35021eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,16 @@
246246
},
247247

248248
_handleConfirmTap(e) {
249+
this.$.dialog.disabled = true;
249250
e.preventDefault();
250251
this.plugin.restApi().post(this.get('api_url'), {})
251252
.then((ok_resp) => {
253+
this.$.dialog.disabled = false;
252254
this.plugin.custom_popup_promise.close();
253255
this.plugin.custom_popup_promise = null;
254256
window.location.reload(true);
255257
}).catch((failed_resp) => {
258+
this.$.dialog.disabled = false;
256259
this.set('errorMessage', 'FAILED: ' + failed_resp);
257260
});
258261
},

0 commit comments

Comments
 (0)