fix tht forms script being broken and forcing nonjs blockbypass when no files form

merge-requests/208/head
fatchan 4 years ago
parent 4de3de3010
commit 88d27a848f
  1. 4
      gulp/res/js/forms.js
  2. 2
      package-lock.json

@ -113,9 +113,9 @@ class formHandler {
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
let postData; let postData;
if (this.enctype === 'multipart/form-data') { if (this.enctype === 'multipart/form-data') {
this.fileInput.disabled = true; //palemoon is dumb, so append them instead this.fileInput && (this.fileInput.disabled = true);
postData = new FormData(this.form); postData = new FormData(this.form);
this.fileInput.disabled = false; this.fileInput && (this.fileInput.disabled = false);
if (this.files && this.files.length > 0) { if (this.files && this.files.length > 0) {
//add files to file input element //add files to file input element
for (let i = 0; i < this.files.length; i++) { for (let i = 0; i < this.files.length; i++) {

2
package-lock.json generated

@ -2472,7 +2472,7 @@
} }
}, },
"express-fileupload": { "express-fileupload": {
"version": "github:fatchan/express-fileupload#ecc5ad4f41771a1c23eed365e451220b9cc3e3c1", "version": "github:fatchan/express-fileupload#9aada2ecdef8a6617ccf82746e5faa2aece77239",
"from": "github:fatchan/express-fileupload", "from": "github:fatchan/express-fileupload",
"requires": { "requires": {
"busboy": "^0.3.1" "busboy": "^0.3.1"

Loading…
Cancel
Save