From a7fb5efca5c7013318ca5a450fc8ea24e8d8dd8d Mon Sep 17 00:00:00 2001 From: Ansyth <tanguy.charles@ensiie.fr> Date: Thu, 12 Dec 2019 01:08:14 +0100 Subject: [PATCH] fix espace_perso.php?modal=chgtMdp --- public/connexion.php | 1 + public/js/connexion.js | 17 +++++------------ public/utils/content.php | 4 ++-- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/public/connexion.php b/public/connexion.php index 75be731..0464a8b 100644 --- a/public/connexion.php +++ b/public/connexion.php @@ -55,6 +55,7 @@ if (isset($_POST['connexion'])&&isset($_POST['page'])&&isset($_POST['pseudo']) & $_SESSION["inscriptionHidden"] = true; $_SESSION["connexionHidden"] = true; + $_SESSION["ok_mdp"] = 1; // mdp valide, pas d'erreur de mdp } else { // erreur de connexion diff --git a/public/js/connexion.js b/public/js/connexion.js index 2f5b510..0a851e6 100644 --- a/public/js/connexion.js +++ b/public/js/connexion.js @@ -17,18 +17,13 @@ function check_mdp(input) { */ function fenetreModalFermee(fenetreModal) { - //console.log("JS: modalFermee appelée"); var modal = ""; if (fenetreModal == 1) { modal = "inscription"; - //console.log("modal = inscription"); } if (fenetreModal == 2) { modal = "connexion"; - //console.log("modal = connexion"); - } - - + } document.getElementById('logoPhp').setAttribute('href', 'index.php?modal=' + modal); document.getElementById('indexPhp').setAttribute('href', 'index.php?modal=' + modal); @@ -37,9 +32,7 @@ function fenetreModalFermee(fenetreModal) if (fenetreModal == 3) { modal = "chgtMdp"; - document.getElementById('logoPhp').setAttribute('href', 'espace_perso.php?modal=' + modal); - } - - -}; - + console.log("choupinette"); + document.getElementById('espacePersoPhp').setAttribute('href', 'espace_perso.php?modal=' + modal); + } +}; \ No newline at end of file diff --git a/public/utils/content.php b/public/utils/content.php index ffdff4e..b1e16b1 100644 --- a/public/utils/content.php +++ b/public/utils/content.php @@ -300,9 +300,9 @@ function fenetreModalChgtMdp() { '<div class="alert alert-danger"> <span class="invalid_submit">'; if ($ok_mdp == 0) - echo '<p>Vos mots de passe doivent être identiques !</p>'; + echo '- Vos mots de passe doivent être identiques ! <br>'; if ($ok_mdp == -1) - echo '<p>Votre mot de passe actuel est erroné !</p>'; + echo '- Votre mot de passe actuel est erroné ! <br>'; echo '</span> </div>'; -- GitLab