From 8aa5d7e86f395a97d7318a50d5831cfd5636110a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Wed, 19 Jul 2023 01:54:24 +0200 Subject: [PATCH] Petite modification pour que l'on ne puisse pas mettre des nombres invalides --- res/calcul.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/calcul.js b/res/calcul.js index 29ff53c..c52413e 100644 --- a/res/calcul.js +++ b/res/calcul.js @@ -28,8 +28,8 @@ function calcul_section(data) { epreuve.entries.forEach(entry => { let field = document.getElementById(entry + "-note"); - if (field.value) caduque = false; - if (field.value || field.required) { + if (field.valid) caduque = false; + if (field.valid || field.required) { points_epreuve += epreuve.coef * arrondi_dixieme(parseFloat((field.value) ? field.value : 0)); coefficients += epreuve.coef; }