Files
Student-Management-System-I…/templates/login/password_reset_confirm.html
T

178 lines
4.9 KiB
HTML

{% extends "base.html" %}
{% load static %}
{% block content %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Set New Password - Student Management System</title>
<style>
:root {
--primary-color: #4285f4;
--secondary-color: #34a853;
--accent-color: #ea4335;
--background-color: #f8f9fa;
--text-color: #202124;
--light-text: #5f6368;
--error-color: #ea4335;
--border-radius: 8px;
--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
body {
font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
background-color: var(--background-color);
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
color: var(--text-color);
}
.reset-container {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
width: 380px;
padding: 40px;
text-align: center;
}
.logo {
margin-bottom: 30px;
width: 80px;
height: 80px;
}
h1 {
font-size: 24px;
font-weight: 500;
margin-bottom: 20px;
}
p {
margin-bottom: 30px;
color: var(--light-text);
line-height: 1.5;
text-align: left;
}
.input-group {
margin-bottom: 20px;
text-align: left;
}
label {
display: block;
margin-bottom: 8px;
font-size: 14px;
color: var(--light-text);
}
input[type="password"] {
width: calc(100% - 20px);
padding: 12px 10px;
border: 1px solid #ddd;
border-radius: var(--border-radius);
font-size: 15px;
transition: border 0.3s;
}
input:focus {
border: 1px solid var(--primary-color);
outline: none;
}
.submit-btn {
background-color: var(--primary-color);
color: white;
border: none;
border-radius: var(--border-radius);
padding: 12px 24px;
font-size: 16px;
cursor: pointer;
width: 100%;
transition: background-color 0.3s;
margin-top: 10px;
}
.submit-btn:hover {
background-color: #3367d6;
}
.error-message {
color: var(--error-color);
margin-bottom: 20px;
text-align: left;
font-size: 14px;
}
.back-link {
display: inline-block;
margin-top: 30px;
color: var(--primary-color);
text-decoration: none;
font-size: 14px;
}
.back-link:hover {
text-decoration: underline;
}
.alert-box {
background-color: rgba(234, 67, 53, 0.1);
border-radius: var(--border-radius);
padding: 15px;
margin-bottom: 20px;
text-align: left;
border-left: 4px solid var(--error-color);
}
</style>
</head>
<body>
<div class="reset-container">
<img src="{% static 'img/logo.png' %}" alt="Logo" class="logo">
<h1>Set New Password</h1>
{% if validlink %}
<p>Please enter your new password below.</p>
{% if form.errors %}
<div class="error-message">
{% for field in form %}
{% for error in field.errors %}
{{ error }}<br>
{% endfor %}
{% endfor %}
</div>
{% endif %}
<form method="post">
{% csrf_token %}
<div class="input-group">
<label for="id_new_password1">New Password</label>
{{ form.new_password1 }}
</div>
<div class="input-group">
<label for="id_new_password2">Confirm New Password</label>
{{ form.new_password2 }}
</div>
<button type="submit" class="submit-btn">Change Password</button>
</form>
{% else %}
<div class="alert-box">
<p>The password reset link was invalid, possibly because it has already been used or has expired.</p>
</div>
<p>Please request a new password reset link.</p>
<a href="{% url 'reset_password_options' %}" class="back-link">Request New Reset Link</a>
{% endif %}
</div>
</body>
</html>
{% endblock %}