From d27b8d127d3c55c8be97cc59eb4bcd3ae62cf0d6 Mon Sep 17 00:00:00 2001 From: IDK Date: Fri, 26 Feb 2021 13:54:16 +0100 Subject: [PATCH] Fix: form saise abs --- ZAbsences.py | 4 ++-- static/js/abs_ajax.js | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ZAbsences.py b/ZAbsences.py index e9cd2f378..52a68c6a2 100644 --- a/ZAbsences.py +++ b/ZAbsences.py @@ -795,7 +795,7 @@ class ZAbsences( Groupes: %s -
+ """ % ( gr_tit, @@ -983,7 +983,7 @@ class ZAbsences( les %s

%s - + """ % (gr_tit, sem["titre_num"], dayname, url_link_semaines, msg), ] diff --git a/static/js/abs_ajax.js b/static/js/abs_ajax.js index a6f99fe8b..bea7c4561 100644 --- a/static/js/abs_ajax.js +++ b/static/js/abs_ajax.js @@ -30,10 +30,9 @@ function ajaxFunction(mod, etudid, dat) { } ajaxRequest.open("POST", "doSignaleAbsenceGrSemestre", true); ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - oForm = document.forms[1]; - oSelectOne = oForm.elements["moduleimpl_id"]; - index = oSelectOne.selectedIndex; - modul_id = oSelectOne.options[index].value; + var oSelectOne = $("#abs_form")[0].elements["moduleimpl_id"]; + var index = oSelectOne.selectedIndex; + var modul_id = oSelectOne.options[index].value; if (mod == 'add') { ajaxRequest.send("reply=0&moduleimpl_id=" + modul_id + "&abslist:list=" + etudid + ":" + dat); }