mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-05-13 17:11:49 +00:00
fix: devWeb - error diplay unified
This commit is contained in:
+1
-1
@@ -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, "<strong>Erreur:</strong> 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));
|
||||
|
||||
@@ -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 = "<i class='fas fa-exclamation-triangle'></i>";
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user