diff --git a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/static/js/login.js b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/static/js/login.js index 5fc8001..2d26a83 100644 --- a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/static/js/login.js +++ b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/static/js/login.js @@ -24,9 +24,14 @@ loginForm.addEventListener("submit", (event) => { ; }); -//Récupération de mot de passe réussie = redirection vers la page de connexion + message d'alerte -const urlParams = new URLSearchParams(window.location.search); -const succes = urlParams.get('succes'); -if (succes != null) { - window.alert(succes); +window.onload = function (){ + const urlParams = new URLSearchParams(window.location.search); + if (urlParams.has('success')) { + if (urlParams.get('success') === "account-created") { + window.alert("Compte créé avec succès."); + } + if (urlParams.get('success') === "password-reseted") { + window.alert("Mot de passe réinitialisé avec succès."); + } + } } diff --git a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/views/login.jsp b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/views/login.jsp index 3085814..37a1ee0 100644 --- a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/views/login.jsp +++ b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/views/login.jsp @@ -8,7 +8,7 @@
-
Titre du jeu
+
Cards Rush - Connexion