reset fields only in case of success
This commit is contained in:
parent
be87d1f78c
commit
ce6f228d79
1 changed files with 2 additions and 2 deletions
4
dist/static/js/httprint.js
vendored
4
dist/static/js/httprint.js
vendored
|
@ -22,6 +22,8 @@ function uploadFile() {
|
|||
stack: 5,
|
||||
position: "top-center"
|
||||
});
|
||||
uploadField.value = null;
|
||||
copies.value = 1;
|
||||
} else {
|
||||
$.toast({
|
||||
text: reply.message || "unable to print file",
|
||||
|
@ -34,7 +36,6 @@ function uploadFile() {
|
|||
position: "top-center"
|
||||
});
|
||||
}
|
||||
uploadField.value = null;
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.log(err);
|
||||
|
@ -48,7 +49,6 @@ function uploadFile() {
|
|||
stack: 5,
|
||||
position: "top-center"
|
||||
});
|
||||
uploadField.value = null;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue