mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Checkboxes check (with alert)
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="submit-btn" id="submitButton">Submit</button>
|
||||
<button class="submit-btn" id="submitButton" onclick="checkBoxes()">Submit</button>
|
||||
|
||||
<div class="progressbar">
|
||||
<div class="progress_fill"></div>
|
||||
|
||||
+20
-5
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user