sumbission date is set after clicking upload of files

Απάντηση: Re: sumbission date is set after clicking upload of files

by Andreas Panagiotopoulos -
Number of replies: 0

Dear Michelle!

I think that i found the solution.

In \lib\form\filemanager.js file, the if statements should be added after the first "if" has closed.

So, patch file should be like that:

if (this.filecount >= this.maxfiles && this.maxfiles!=-1) {
button_addfile.setStyle('display', 'none');

+    }
+        if(this.filecount == this.maxfiles) {
+          submit_button.disabled=false;   
+        }
+        else {
+        submit_button.disabled=true;
+        }

-  }

To be honest, I used the following and everything is working good. The assignment can't be saved before a file has been uploaded.

 

if (this.filecount >= this.maxfiles && this.maxfiles!=-1) {
button_addfile.setStyle('display', 'none');
}
//EDIT Andreas
if(this.filecount == 0) {
submit_button.disabled=true;
}
else {
submit_button.disabled=false;
}