mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Submit button disabled without video, bigger middle part and dropzone, button in dropzone
This commit is contained in:
+18
-1
@@ -129,4 +129,21 @@ function loadLanguageOptions(){
|
||||
console.log("Error in script.js loadLanguageOptions function");
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function activateSubmitBtn(hasFile){
|
||||
submitButton.disabled = !hasFile;
|
||||
}
|
||||
|
||||
videoUpload.addEventListener("change", () => {
|
||||
activateSubmitBtn(videoUpload.files.length > 0);
|
||||
});
|
||||
|
||||
uploadContainer.addEventListener("drop", (e) => {
|
||||
e.preventDefault();
|
||||
const file = e.dataTransfer.files[0];
|
||||
|
||||
if(file){
|
||||
activateSubmitBtn(true);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user