reset fields only in case of success

This commit is contained in:
Davide Alberani 2019-08-17 14:40:28 +02:00
parent 1973124be9
commit 84a9204655

View file

@ -22,6 +22,8 @@ function uploadFile() {
stack: 5, stack: 5,
position: "top-center" position: "top-center"
}); });
uploadField.value = null;
copies.value = 1;
} else { } else {
$.toast({ $.toast({
text: reply.message || "unable to print file", text: reply.message || "unable to print file",
@ -34,7 +36,6 @@ function uploadFile() {
position: "top-center" position: "top-center"
}); });
} }
uploadField.value = null;
}) })
.catch(function(err) { .catch(function(err) {
console.log(err); console.log(err);
@ -48,7 +49,6 @@ function uploadFile() {
stack: 5, stack: 5,
position: "top-center" position: "top-center"
}); });
uploadField.value = null;
}); });
} }