Ajout page connexion/mot de passe ouble/ reinitialisation du mot de passe backoffice

This commit is contained in:
ben
2025-12-04 12:19:19 +01:00
parent 7be80830f1
commit 58d210802f
4 changed files with 190 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Connexion Admin</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body{
background: #f2f4f7;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.login-card {
width: 100%;
max-width: 380px;
}
</style>
</head>
<body>
<div class="card shadow login-card">
<div class="card-body p-4">
<h3 class="text-center mb-4">Connexion Admin</h3>
<form>
<div class="mb-3">
<label class="form-label">Mot de passe</label>
<input type="password" class="form-control" placeholder="••••••••">
</div>
<button class="btn btn-primary w-100">Se connecter</button>
<div class="text-center mt-3">
<a href="#" class="text-decoration-none">Mot de passe oublié ?</a>
</div>
</form>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mot de passe oublié</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f2f4f7;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.forgot-password-card {
width: 100%;
max-width: 380px;
}
</style>
</head>
<body>
<div class="card shadow forgot-password-card">
<div class="card-body p-4">
<h3 class="text-center mb-4">Mot de passe oublié</h3>
<form>
<div class="mb-3">
<label class="form-label">Adresse e-mail</label>
<input type="email" class="form-control" placeholder="exemple@mail.com">
</div>
<button class="btn btn-primary w-100">Réinitialiser le mot de passe</button>
<div class="text-center mt-3">
<a href="page_de_connexion.html" class="text-decoration-none">Retour à la connexion</a>
</div>
</form>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,19 @@
const form= document.getElementById('resetForm');
const password = document.getElementById('password');
const confirmPassword = document.getElementById('confirmPassword');
const errorMsg = document.getElementById('errorMsg');
const successMsg = document.getElementById('successMsg');
form.addEventListener('submit', function(e) {
e.preventDefault();
if (password.value !== confirmPassword.value) {
errorMsg.style.display = 'block';
successMsg.style.display = 'none';
} else {
errorMsg.style.display = 'none';
successMsg.style.display = 'block';
console.log('SUCCES');
}
});

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Réinitialisation du mot de passe</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
/>
<style>
body {
background: #f2f4f7;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.reset-password-card {
width: 100%;
max-width: 380px;
}
</style>
</head>
<body>
<div class="card shadow reset-password-card">
<div class="card-body p-4">
<h3 class="text-center mb-4">Nouveau mot de passe</h3>
<p class="text-center text-muted mb-4">
Entrez votre nouveau mot de passe et confirmez-le.
</p>
<form id="resetForm">
<div class="mb-3">
<label class="form-label">Nouveau mot de passe</label>
<input
type="password"
class="form-control"
id="password"
required
/>
</div>
<div class="mb-3">
<label class="form-label">Confirmer le mot de passe</label>
<input
type="password"
class="form-control"
id="confirmPassword"
required
/>
</div>
<div
id="errorMsg"
class="alert alert-danger text-center"
style="display: none"
>
Les mots de passe ne correspondent pas.
</div>
<div
id="successMsg"
class="alert alert-success text-center"
style="display: none"
>
Votre mot de passe a été modifié avec succès !
</div>
<button class="btn btn-primary w-100" type="submit">
Changer le mot de passe
</button>
</form>
</div>
</div>
<script src="reinitialisation_du_mot_de_passe.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>