FIX date survey : button to add dates would not work. Session would store cells numbers which would stay to 10 for next surveys created.

This commit is contained in:
tnegre 2023-08-30 11:46:33 +02:00
parent 5d9d44479e
commit 9b960b684d

View file

@ -179,6 +179,7 @@ if (GETPOST('confirmation')) {
// Add survey into database
if (!$erreur && $erreurNb == 0) {
$_SESSION["toutchoix"] = substr("$choixdate", 1);
unset($_SESSION["nbrecaseshoraires"]);
ajouter_sondage();
}
@ -215,7 +216,7 @@ llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss
//nombre de cases par défaut
if (!isset($_SESSION["nbrecaseshoraires"])) {
$_SESSION["nbrecaseshoraires"] = 5;
} elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5) {
} elseif ((GETPOST('ajoutcases') || GETPOST("ajoutcases_y")) && $_SESSION["nbrecaseshoraires"] == 5) {
$_SESSION["nbrecaseshoraires"] = 10;
}