Mot de passe oublie terminer

This commit is contained in:
jleroy
2024-04-29 13:44:37 +02:00
parent 2791df65ea
commit ae040010aa
18 changed files with 505 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Changer votre mot de passe',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="container" id="container-main">
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<h2 class="text-center mb-4">Changer de mot de passe :</h2>
<form th:action="@{/forgotPassword/changePassword/check}" method="post">
<input type="hidden" name="link" th:value="${param.link}" />
<div class="mb-3">
<label for="email" class="form-label">Email:</label>
<input type="email" class="form-control" name="email" id="email" placeholder="Entrer l'email du compte">
</div>
<div class="mb-3">
<label for="password" class="form-label">Mot de passe:</label>
<input type="password" class="form-control" name="password" id="password" placeholder="Entrez votre nouveau mot de passe">
</div>
<div class="mb-3">
<label for="confirmPassword" class="form-label">Confirmer le mot de passe:</label>
<input type="password" class="form-control" name="confirmPassword" id="confirmPassword" placeholder="Confirmer votre mot de passe">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary">Changer le mot de passe</button>
</div>
</form>
<div th:if="${param.emailError}" class="text-danger">
Votre adresse mail est incorrect !
</div>
<div th:if="${param.passwordSecurity}" class="text-danger">
Votre mot de passe ne correpond pas au règle de sécurité !
</div>
<div th:if="${param.passwordNotIdentique}" class="text-danger">
Vos mot de passe ne sont pas identique !
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Lien expiré',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="container" id="container-main">
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<h2 class="text-center mb-4">Ce lien à expiré !</h2>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Mot de passe oublié',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="container" id="container-main">
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<h2 class="text-center mb-4">Mot de passe oublié :</h2>
<form th:action="@{/forgotPassword}" method="post">
<div class="mb-3">
<label for="email" class="form-label">Email:</label>
<input type="text" class="form-control" name="email" id="email" placeholder="Entrez votre adresse mail">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary">Changer de mot de passe</button>
</div>
</form>
<div th:if="${param.error}" class="text-danger">
L'adresse mail n'existe pas !
</div>
<div th:if="${param.mailSend}" class="text-success">
Un email vous a été envoyé ! Le lien expire dans 10 minutes
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -22,7 +22,7 @@
<label class="form-check-label" for="remember-me">Se souvenir de moi</label>
</div>
<div class="mb-3">
<a href="/mot-de-passe-oublie">Mot de passe oublié</a>
<a href="/forgotPassword">Mot de passe oublié</a>
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary">Connexion</button>
@@ -35,6 +35,9 @@
<div th:if="${param.logout}" class="text-success">
Vous avez été déconnecté
</div>
<div th:if="${param.emailForForgotPassword}" class="text-danger">
Vous devez entrée une adresse mail valide !
</div>
</div>
</div>
</div>