diff --git a/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ForgottenPasswordServlet.java b/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ForgottenPasswordServlet.java index e2d65bb..55a9677 100644 --- a/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ForgottenPasswordServlet.java +++ b/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ForgottenPasswordServlet.java @@ -60,7 +60,7 @@ public class ForgottenPasswordServlet extends HttpServlet { if (forgottenPasswordBean.validate(uri)) { httpResponse = new HttpResponse(HttpResponseCode.OK, "Mail sent"); } else { - httpResponse = new HttpResponse(HttpResponseCode.NOT_FOUND, "Erreur: L'email renseigné est inconnu de nos services."); + httpResponse = new HttpResponse(HttpResponseCode.NOT_FOUND, "L'email renseigné est inconnu de nos services."); } out.println(gson.toJson(httpResponse)); diff --git a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/tags/forms/forgotten-password.tag b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/tags/forms/forgotten-password.tag index a13bf7d..bbbdb02 100644 --- a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/tags/forms/forgotten-password.tag +++ b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/tags/forms/forgotten-password.tag @@ -60,8 +60,24 @@ // Notification const notification = document.createElement("div"); notification.classList.add("notification", "is-danger"); - notification.innerHTML = error.message; + + const notificationTitle = document.createElement("p"); + notificationTitle.classList.add("title", "is-6"); + notificationTitle.innerHTML = "Erreur"; + + const notificationIcon = document.createElement("span"); + notificationIcon.classList.add("icon"); + notificationIcon.innerHTML = ""; + + const notificationMessage = document.createElement("p"); + notificationMessage.classList.add("subtitle", "is-6"); + notificationMessage.innerHTML = error.message; + + notificationTitle.appendChild(notificationIcon); + notification.appendChild(notificationTitle); + notification.appendChild(notificationMessage); document.body.appendChild(notification); + setTimeout(() => notification.remove(), 5010); }