diff --git a/canapEPFL/cible.php b/canapEPFL/cible.php index dc2acfea24dd03314f596ec1e42182c0794de40d..7754e154c48bd9607fff0ab86f672c5c8f195e21 100644 --- a/canapEPFL/cible.php +++ b/canapEPFL/cible.php @@ -32,7 +32,7 @@ mailToApprenti($candidateData->mailApprenti, $candidateData->formation); // kill session $_SESSION['formError'] = false; - // unset($_SESSION['postedForm']); + unset($_SESSION); include("templates/confirmationText.php"); } else { $_SESSION['formError'] = true; diff --git a/canapEPFL/form.php b/canapEPFL/form.php index 9d4d61b93220f9992118d7461bfb2ebac36390db..e09ab996c789922d61d98805a3b3862f55c8497e 100644 --- a/canapEPFL/form.php +++ b/canapEPFL/form.php @@ -36,7 +36,7 @@ <label class="custom-control-label" for="lieuLausanne">EPFL Lausanne</label> </div> <div class="custom-control custom-radio"> - <input type="radio" name="lieu" id="lieuSion" class="custom-control-input" value="Sion" <?php echo ($_SESSION['postedForm']['lieu'] == "Sion") ? "checked=\"checked\"" : ''; ?>> + <input type="radio" name="lieu" id="lieuSion" class="custom-control-input" value="Sion" <?php echo ($_SESSION['postedForm']['lieu'] == "Sion") ? "checked=\"checked\"" : ''; ?>> <label class="custom-control-label" for="lieuSion">EPFL Valais Sion</label> </div> </div> @@ -284,7 +284,7 @@ </tr> <?php for($i = 2; $i < 4; $i++){ - if($_SESSION['postedForm']['employeurPro'.$i]){ + if($_SESSION['postedForm']['employeurPro'.$i]){ ?> <tr> <td><input type="text" class="form-control" name="employeurPro<?php echo $i ?>" placeholder="Employeur" value="<?php echo $_SESSION['postedForm']['employeurPro'.$i] ?>"/></td> @@ -450,7 +450,7 @@ if ($_SESSION['formError']) { echo "<script>showOnFormReturn(lieu);</script>"; } - require_once('templates/footer.php'); + // require_once('templates/footer.php'); ?> </body> </html> \ No newline at end of file diff --git a/canapEPFL/models/PersonnalData.php b/canapEPFL/models/PersonnalData.php index b4f799a6dab0b867f4387e9343c24fd5e21f863f..d1ccfd1eefec2720ef37965d1dadc123c8a634f9 100644 --- a/canapEPFL/models/PersonnalData.php +++ b/canapEPFL/models/PersonnalData.php @@ -17,7 +17,7 @@ class PersonnalData { "interactiveMediaDesigner" => "InteractiveMediaDesigners" ); private $dateNow; - private $rootpath = 'D:/Formdata/'; // \\\\scxdata\\apprentis$\\candidatures\\nouvelles\\ + private $rootpath = '\\\\scxdata\\apprentis$\\candidatures\\nouvelles\\'; public $formation = ""; public $lieu = ""; public $filiere = ""; diff --git a/canapEPFL/script.js b/canapEPFL/script.js index d99432b57e8fcfac1128d3b4397318b96a020b90..b0830b00147eab21ac03c8af35801ebdb82692ae 100644 --- a/canapEPFL/script.js +++ b/canapEPFL/script.js @@ -73,11 +73,12 @@ function checkFileFormat(obj) { } function checkYearDate(toCheckValue, errorZone, coefficiantYear) { + // TODO: check this var inputYear = $(toCheckValue).val(); var currentYear = (new Date).getFullYear() + coefficiantYear; if ((inputYear != parseInt(inputYear, 10)) || (currentYear < inputYear) || (inputYear.length != 4)) { - $(errorZone).html('<p class ="errorMsgs">Date invalide'); + $(errorZone).html('<p class="errorMsgs">Date invalide'); } else { $(errorZone).html(""); } diff --git a/canapEPFL/templates/head.php b/canapEPFL/templates/head.php index 589bac54e175cd78368b23665b311b4c2e5f5ffe..9fae93b9a5d951df806863945b347da91fb5c60e 100644 --- a/canapEPFL/templates/head.php +++ b/canapEPFL/templates/head.php @@ -11,9 +11,9 @@ <style>.error { color: red!important; }</style> <noscript>Veuillez Activer JavaScript pour utiliser le service de postulation</noscript> <?php - // ini_set("display_errors", 0); - // error_reporting(0); - ini_set("display_errors", 1); - error_reporting(E_ALL); + ini_set("display_errors", 0); + error_reporting(0); + // ini_set("display_errors", 1); + // error_reporting(E_ALL); session_start(); ?> \ No newline at end of file