Files
AdventCalendar/templates/admin_change_password.html
2025-12-02 15:07:54 +01:00

66 lines
2.7 KiB
HTML

<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Changer mot de passe - Admin</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
</head>
<body class="bg-light">
<div class="container py-5">
<div class="row justify-content-center">
<div class="col-md-6">
<div class="card shadow-lg">
<div class="card-header bg-primary text-white text-center">
<h2 class="mb-0">
<i class="fas fa-key me-2"></i>Changer mot de passe
</h2>
</div>
<div class="card-body p-4">
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-info alert-dismissible fade show mb-4">
{% for msg in messages %}
<div>{{ msg }}</div>
{% endfor %}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endif %}
{% endwith %}
<form method="post">
<div class="mb-3">
<label class="form-label fw-bold">Mot de passe actuel</label>
<input type="password" name="current_password" class="form-control" required autocomplete="current-password">
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label class="form-label fw-bold">Nouveau mot de passe</label>
<input type="password" name="new_password" class="form-control" minlength="6" required autocomplete="new-password">
<small class="text-muted">Minimum 6 caractères</small>
</div>
<div class="col-md-6 mb-3">
<label class="form-label fw-bold">Confirmer nouveau</label>
<input type="password" name="confirm_password" class="form-control" minlength="6" required autocomplete="new-password">
</div>
</div>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{{ url_for('admin_projects') }}" class="btn btn-outline-secondary me-md-2">
<i class="fas fa-arrow-left me-1"></i>Retour
</a>
<button type="submit" class="btn btn-primary">
<i class="fas fa-save me-1"></i>Changer mot de passe
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>