Petite modification pour que l'on ne puisse pas mettre des nombres invalides

This commit is contained in:
Valentin Moguérou 2023-07-19 01:54:24 +02:00
parent e62387197d
commit 8aa5d7e86f

View File

@ -28,8 +28,8 @@ function calcul_section(data) {
epreuve.entries.forEach(entry => { epreuve.entries.forEach(entry => {
let field = document.getElementById(entry + "-note"); let field = document.getElementById(entry + "-note");
if (field.value) caduque = false; if (field.valid) caduque = false;
if (field.value || field.required) { if (field.valid || field.required) {
points_epreuve += epreuve.coef * arrondi_dixieme(parseFloat((field.value) ? field.value : 0)); points_epreuve += epreuve.coef * arrondi_dixieme(parseFloat((field.value) ? field.value : 0));
coefficients += epreuve.coef; coefficients += epreuve.coef;
} }