From 45a9d06d22f7bccea62ab111e67d99f02705f4d7 Mon Sep 17 00:00:00 2001 From: nicrausaz <n.crausaz99@gmail.com> Date: Thu, 11 Oct 2018 13:48:26 +0200 Subject: [PATCH] pre-prod test --- canapEPFL/cible.php | 2 +- canapEPFL/form.php | 6 +++--- canapEPFL/models/PersonnalData.php | 2 +- canapEPFL/script.js | 3 ++- canapEPFL/templates/head.php | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/canapEPFL/cible.php b/canapEPFL/cible.php index dc2acfe..7754e15 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 9d4d61b..e09ab99 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 b4f799a..d1ccfd1 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 d99432b..b0830b0 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 589bac5..9fae93b 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 -- GitLab