This commit is contained in:
arussac
2025-02-12 09:52:06 +01:00
parent a88678fc3f
commit 522e5db91e
4 changed files with 94 additions and 44 deletions

View File

@@ -69,18 +69,15 @@ document.addEventListener("DOMContentLoaded", async () => {
function setRequiredAttributes() {
const firstInput = document.getElementById('first');
const lastInput = document.getElementById('last');
const numeratorInput = document.getElementById('numerator');
const denominatorInput = document.getElementById('denominator');
if (firstLastContainer.style.display === 'block') {
firstInput.required = true;
lastInput.required = true;
numeratorInput.required = true;
denominatorInput.required = true;
} else {
firstInput.required = false;
lastInput.required = false;
numeratorInput.required = false;
denominatorInput.required = false;
}
}
@@ -128,7 +125,8 @@ document.addEventListener("DOMContentLoaded", async () => {
return 0;
}
const choice = choiceSelect.value
const measurementIds = getMeasurermentsIdsFromForm(choice,firstInput,lastInput);
const measurementIds = getMeasurementsIdsFromForm(choice,firstInput,lastInput);
console.log(measurementIds)
postNewVideo(projectId, measurementIds, nameVideo, videoResolution, videoDuration)
.then(()=>{
alert('Nouvelle vidéo enregistrée :\nNom : ' + nameVideo +