mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2026-11-09 08:40:07 +00:00
Change add job handling (preparation for api processing)
This commit is contained in:
1 parent
8d47d16319
commit
ab0e79ac3b
2 files changed
+21
-8
No files matched your search
@@ -14,9 +14,15 @@ function SubmitAddJobForm(newJobFormElement, progressModalElement, request) {
|
||||
progressModalElement.querySelector(".determinate").style.width = progressInPercent;
|
||||
});
|
||||
request.addEventListener("load", function(event) {
|
||||
console.log(request.response);
|
||||
newJobFormElement.reset();
|
||||
location.reload();
|
||||
if (request.status === 201) {
|
||||
window.location.href = JSON.parse(this.responseText)['redirect_url'];
|
||||
}
|
||||
if (request.status === 400) {
|
||||
console.log(JSON.parse(this.responseText));
|
||||
}
|
||||
if (request.status === 500) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
request.addEventListener("abort", function(event) {
|
||||
progressModalElement.querySelector(".progress-in-percent").innerHTML = "0%";
|
||||
|
||||
Reference in new issue
Block a user