-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforgot_password.html
64 lines (59 loc) · 2.83 KB
/
forgot_password.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!-- forgot_password.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forgot Password</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body class= "forgot_password-body">
<div class="forgot_password-container">
<header>
<img src="{{ url_for('static', filename='image/logo7.png') }}" alt="Logo" class="logo">
<h1>Forgot Password</h1>
</header>
<p style="text-align: center;">Enter your email address below and we'll send you a link to reset your password.</p>
<form method="POST" action="{{ url_for('forgot_password') }}">
<label for="email_id">Email ID:</label><br>
<input type="email" id="email_id" name="email_id" required><br>
<button type="submit">Send</button>
</form>
<a href="{{ url_for('login') }}" style="display: block; text-align: center;">Back to Login</a>
</div>
<div id="flashModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<p id="flashMessage"></p>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const flashMessages = JSON.parse('{{ get_flashed_messages(with_categories=True)|tojson|safe }}');
if (flashMessages.length > 0) {
const modal = document.getElementById('flashModal');
const flashMessageElement = document.getElementById('flashMessage');
const span = document.getElementsByClassName('close')[0];
flashMessages.forEach(([category, message]) => {
flashMessageElement.textContent = message;
const modalContent = document.querySelector('.modal-content');
modalContent.classList.remove('success', 'error', 'warning', 'info');
modalContent.classList.add(category);
modal.style.display = 'block';
});
span.onclick = function() {
modal.style.display = 'none';
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = 'none';
}
}
setTimeout(() => {
modal.style.display = 'none';
}, 5000); // Display for 5 seconds
}
});
</script>
</body>
</html>