From 336f74d50ab281b840eaf291e8b965e0976d7c74 Mon Sep 17 00:00:00 2001 From: kmitresse Date: Sat, 23 Mar 2024 09:58:17 +0100 Subject: [PATCH] feat: dev-web - translation --- .../src/main/webapp/WEB-INF/static/js/login.js | 15 ++++++++++----- .../src/main/webapp/WEB-INF/views/login.jsp | 2 +- .../src/main/webapp/WEB-INF/views/main-menu.jsp | 4 +--- 3 files changed, 12 insertions(+), 9 deletions(-) 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