From a32e7e5744d99304b7ae938ed1a6848ac923d09c Mon Sep 17 00:00:00 2001 From: Verena Schulz Date: Wed, 12 Nov 2025 17:39:02 +0100 Subject: [PATCH] Checkboxes check (with alert) --- electron/main/index.html | 2 +- electron/main/script.js | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/electron/main/index.html b/electron/main/index.html index c6980f3..f88b4c2 100644 --- a/electron/main/index.html +++ b/electron/main/index.html @@ -38,7 +38,7 @@ - +
diff --git a/electron/main/script.js b/electron/main/script.js index a2e4a98..a325e9f 100644 --- a/electron/main/script.js +++ b/electron/main/script.js @@ -23,12 +23,27 @@ manualBtn.addEventListener('click', () => { }); -submitBtn.addEventListener('click', () => { - -// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"}) - -}); +//function to check if one checkbox is at least klicked +function checkBoxes() { + const checkboxes = document.querySelectorAll('input[name="docFormat"]'); + let isChecked = false; + checkboxes.forEach(function(checkbox){ + if(checkbox.checked){ + isChecked = true; + } + }); + + if(isChecked){ + //Code to submit the video + } else { + //language only english at the moment + alert('Please select at least one document type.'); + } +// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"}) +} + +//language changing feature function changeLanguage(language) { if (language === 'en') { document.getElementById('title').textContent = 'Video to document';