mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 12:29:50 -04:00
Stop AJAX when success or failure and show form on failure
AJAX requests stop on success or failure, as the waiting page does not have to referesh any longer. Also on failure a form that allows user to try again is shown.
This commit is contained in:
@@ -28,7 +28,12 @@
|
||||
'data': form ? $('#' + form).serialize() : {}
|
||||
}
|
||||
).done(
|
||||
response => flushQueue(queue, response)
|
||||
response => {
|
||||
flushQueue(queue, response);
|
||||
if (response.stop === 1) {
|
||||
poll = function(){};
|
||||
}
|
||||
}
|
||||
).fail(
|
||||
() => poll = function(){}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user