mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 11:12:58 +00:00
- Show clear error when user email doesn't exist instead of generic security message - Add registration link for users whose email is not found - Better user experience while maintaining security - Help users understand they need to register first 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
290 lines
8.1 KiB
HTML
290 lines
8.1 KiB
HTML
{% extends 'base.html' %}
|
|
{% load static %}
|
|
|
|
{% block title %}Forgot Password{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
/* Override main-container for full-width sections */
|
|
.main-container {
|
|
max-width: none;
|
|
padding: 0;
|
|
margin-top: 0;
|
|
}
|
|
|
|
/* Forgot password page background */
|
|
.forgot-password-page {
|
|
min-height: calc(100vh - 80px); /* Account for header height */
|
|
background: var(--gradient-hero);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: clamp(20px, 5vw, 40px);
|
|
}
|
|
|
|
/* Forgot password container */
|
|
.forgot-password-container {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: clamp(16px, 4vw, 24px);
|
|
padding: clamp(32px, 8vw, 48px);
|
|
box-shadow: 0 20px 60px rgba(30, 64, 175, 0.15);
|
|
border: 1px solid rgba(255, 255, 255, 0.8);
|
|
backdrop-filter: blur(20px);
|
|
width: 100%;
|
|
max-width: 480px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Decorative elements */
|
|
.forgot-password-container::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 80px;
|
|
height: 80px;
|
|
background: var(--gradient-primary);
|
|
border-top-right-radius: clamp(16px, 4vw, 24px);
|
|
border-bottom-left-radius: clamp(16px, 4vw, 24px);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.forgot-password-container::after {
|
|
content: '🔑';
|
|
position: absolute;
|
|
top: 24px;
|
|
right: 24px;
|
|
font-size: 24px;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Header section */
|
|
.forgot-password-header {
|
|
text-align: center;
|
|
margin-bottom: clamp(24px, 6vw, 32px);
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.forgot-password-title {
|
|
font-size: clamp(24px, 6vw, 32px);
|
|
font-weight: 700;
|
|
color: var(--primary-blue);
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.forgot-password-subtitle {
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
color: var(--text-secondary);
|
|
margin: 0;
|
|
}
|
|
|
|
/* Form styles */
|
|
.forgot-password-form {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: clamp(16px, 4vw, 20px);
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: 8px;
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: clamp(14px, 4vw, 18px) clamp(16px, 4vw, 20px);
|
|
border: 2px solid var(--border-medium);
|
|
border-radius: clamp(8px, 2vw, 12px);
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
transition: all 0.3s ease;
|
|
background: white;
|
|
min-height: 48px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-blue);
|
|
box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.1);
|
|
}
|
|
|
|
/* Reset button */
|
|
.reset-btn {
|
|
width: 100%;
|
|
background: var(--gradient-primary);
|
|
color: white;
|
|
border: none;
|
|
padding: clamp(16px, 4vw, 20px);
|
|
border-radius: clamp(8px, 2vw, 12px);
|
|
font-size: clamp(16px, 4vw, 18px);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
min-height: 56px;
|
|
margin-bottom: clamp(20px, 5vw, 24px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.reset-btn:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
|
|
background: var(--gradient-success);
|
|
}
|
|
|
|
.reset-btn:active {
|
|
transform: translateY(0);
|
|
box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
|
|
}
|
|
|
|
/* Messages */
|
|
.messages {
|
|
margin-bottom: clamp(16px, 4vw, 20px);
|
|
}
|
|
|
|
.message {
|
|
padding: 12px 16px;
|
|
border-radius: clamp(8px, 2vw, 12px);
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
}
|
|
|
|
.message.success {
|
|
background: rgba(16, 185, 129, 0.1);
|
|
color: var(--success-dark);
|
|
border: 1px solid rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.message.error {
|
|
background: rgba(239, 68, 68, 0.1);
|
|
color: var(--error-red);
|
|
border: 1px solid rgba(239, 68, 68, 0.3);
|
|
}
|
|
|
|
.message.info {
|
|
background: rgba(59, 130, 246, 0.1);
|
|
color: var(--primary-blue);
|
|
border: 1px solid rgba(59, 130, 246, 0.3);
|
|
}
|
|
|
|
/* Auth links */
|
|
.forgot-password-page .forgot-password-container .auth-links {
|
|
text-align: center;
|
|
padding-top: clamp(16px, 4vw, 20px);
|
|
border-top: 1px solid var(--border-light);
|
|
}
|
|
|
|
.forgot-password-page .forgot-password-container .auth-links p {
|
|
margin: 8px 0;
|
|
color: var(--text-secondary);
|
|
font-size: clamp(14px, 3.5vw, 16px);
|
|
}
|
|
|
|
.forgot-password-page .forgot-password-container .auth-links a {
|
|
color: var(--primary-blue);
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.forgot-password-page .forgot-password-container .auth-links a:hover {
|
|
color: var(--primary-blue);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 480px) {
|
|
.forgot-password-page {
|
|
padding: 16px;
|
|
}
|
|
|
|
.forgot-password-container {
|
|
padding: 24px;
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="forgot-password-page">
|
|
<div class="forgot-password-container">
|
|
<!-- Header -->
|
|
<div class="forgot-password-header">
|
|
<h1 class="forgot-password-title">Forgot Password</h1>
|
|
<p class="forgot-password-subtitle">Enter your email address and we'll send you a link to reset your password</p>
|
|
</div>
|
|
|
|
<!-- Messages -->
|
|
{% if messages %}
|
|
<div class="messages">
|
|
{% for message in messages %}
|
|
<div class="message {{ message.tags }}">{{ message }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Forgot Password Form -->
|
|
<form method="post" class="forgot-password-form">
|
|
{% csrf_token %}
|
|
|
|
<div class="form-group">
|
|
<label for="email" class="form-label">Email Address</label>
|
|
<input
|
|
type="email"
|
|
id="email"
|
|
name="email"
|
|
class="form-input"
|
|
placeholder="Enter your email address"
|
|
required
|
|
autocomplete="email"
|
|
>
|
|
</div>
|
|
|
|
<button type="submit" class="reset-btn">
|
|
📧 Send Reset Instructions
|
|
</button>
|
|
</form>
|
|
|
|
<!-- Auth Links -->
|
|
<div class="auth-links">
|
|
<p>Remember your password? <a href="{% url 'authentication:login' %}">Sign in</a></p>
|
|
<p>Don't have an account? <a href="{% url 'authentication:register' %}">Create account</a></p>
|
|
<p>Email not found? <a href="{% url 'authentication:register' %}">Register here</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_js %}
|
|
<script>
|
|
// Focus on email field when page loads
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const emailField = document.getElementById('email');
|
|
if (emailField) {
|
|
emailField.focus();
|
|
}
|
|
|
|
// Add loading state to button on form submission
|
|
const resetForm = document.querySelector('.forgot-password-form');
|
|
const resetBtn = document.querySelector('.reset-btn');
|
|
|
|
if (resetForm && resetBtn) {
|
|
resetForm.addEventListener('submit', function() {
|
|
resetBtn.innerHTML = '⏳ Sending instructions...';
|
|
resetBtn.disabled = true;
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %} |