mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 09:00:40 +00:00
Change add job handling (preparation for api processing)
This commit is contained in:
@ -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