diff --git a/twentynineteen-child/adhesionForm.js b/twentynineteen-child/adhesionForm.js index 2341cc25290d119323b9786efb9f9571863cc484..83936cccbfc5367e1f40654f957b8131c0400883 100644 --- a/twentynineteen-child/adhesionForm.js +++ b/twentynineteen-child/adhesionForm.js @@ -162,6 +162,21 @@ function prepareDocument() { } + var choicePeriod = document.getElementById("ancienSelectPeriod").getAttribute("value"); + + var listOfPeriodOptions = document.getElementsByClassName("optionPeriod"); + + for (var c = 0; c "" ); -$debug_mode = true; +$debug_mode = false; -function tryToEcho($var) -{ - if (isset($_POST[$var])) { +function tryToEcho($var){ + if (isset($_POST[$var])){ echo $_POST[$var]; } } -function tryToShowError($var) -{ +function tryToSetInputSelect($key,$value){ + //fonction utilisée pour définir l'option sélectionnée lorsque l'envoi du formulaire a échoué. + if (isset($_POST[$key])){ + + if($_POST[$key] == $value){ + echo "selected"; + } + + + } + +} + +function tryToShowError($var){ global $errors; - if (strlen($errors[$var]) > 0) { + if (strlen($errors[$var])>0){ echo "

" . $errors[$var] . "

"; } } $numberOfErrors = 0; -if (isset($_POST)) { - if (isset($_POST["firstSelection"])) { +if (isset($_POST)){ + if (isset($_POST["firstSelection"])){ include "traitementAdhesion.php"; - if ($debug_mode) { + if($debug_mode){ echo "
début du traitement
"; } - $errors = traitement($_POST, $errors); + $errors = traitement($_POST,$errors); - if ($debug_mode) { + if($debug_mode){ echo "
fin du traitement
"; } - foreach ($errors as $key => $value) { + foreach ($errors as $key => $value){ - if ($debug_mode) { + if($debug_mode){ echo $key . " : " . $value . "
"; } - if (strlen($value) > 0) { - $numberOfErrors += 1; + if (strlen($value)>0){ + $numberOfErrors+=1; } } - if ($debug_mode) { + if($debug_mode){ echo "
nombre d'erreurs : " . $numberOfErrors . "
"; var_dump($errors); @@ -74,9 +85,17 @@ if (isset($_POST)) { } + + ?> + + + + + + Renouvellement d'adhésion @@ -175,7 +194,7 @@ function createNameClass($variable) ); - $variable = strtr($variable, $chars); + $variable = strtr($variable,$chars); return $variable; } @@ -245,24 +264,32 @@ sort($classSelectMenu); sort($classSelectMenuExtended); + ?> +

Formulaire de renouvellement d'adhésion

1) { + } + elseif ($numberOfErrors>1){ echo "Plusieurs erreurs sont survenues lors de l'envoi du formulaire. Veuillez vérifier vos informations"; } + ?>

+ "> + "> + "> + ">
- + ">
+ - ">
- + ">
+ @@ -394,39 +419,33 @@ sort($classSelectMenuExtended);

Informations obligatoires :

- ">
- + ">
+ - ">
- + ">
+ - ">
- + ">
+ - ">
- + ">
+ - ">
- + ">
+ - ">
- + ">
+ @@ -434,20 +453,17 @@ sort($classSelectMenuExtended);

Informations relatives à Chorus Pro

- ">
- + ">
+ - ">
- + ">
+ - ">
- + ">
+ diff --git a/twentynineteen-child/periodSelection.php b/twentynineteen-child/periodSelection.php index 96bc2ec70405fe3a5aaeb8dd21ac4542d8f5ef38..a16109490ac8d08b7446f666875be47047546b4d 100644 --- a/twentynineteen-child/periodSelection.php +++ b/twentynineteen-child/periodSelection.php @@ -56,7 +56,7 @@ function generateDates() $message = $message . $premiereDate->format("d/m/y"); - $message = ""; + $message = ""; echo $message; }