mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 12:52:58 +00:00
🧹 Improve email verification UX on login page
• Remove always-visible 'Resend email verification' link from login page • Add contextual resend link only when user needs email verification • Clean login page with only relevant links (forgot password, register) • Better user experience - show resend option exactly when needed • Enable HTML rendering in messages for proper link display 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3e1136acfa
commit
b9c6264b0e
@ -103,7 +103,9 @@ def login_view(request):
|
||||
if user is not None:
|
||||
# Check if email is verified (only if email verification is required)
|
||||
if settings.REQUIRE_EMAIL_VERIFICATION and not user.email_verified:
|
||||
messages.warning(request, 'Please verify your email address before logging in. Check your inbox for the verification link.')
|
||||
from django.urls import reverse
|
||||
resend_url = reverse('authentication:resend_verification')
|
||||
messages.warning(request, f'Please verify your email address before logging in. Check your inbox for the verification link, or <a href="{resend_url}">resend verification email</a>.')
|
||||
return render(request, 'authentication/login.html')
|
||||
|
||||
login(request, user)
|
||||
|
||||
@ -132,7 +132,7 @@
|
||||
{% if messages %}
|
||||
<div class="messages">
|
||||
{% for message in messages %}
|
||||
<div class="message {{ message.tags }}">{{ message }}</div>
|
||||
<div class="message {{ message.tags }}">{{ message|safe }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -176,7 +176,6 @@
|
||||
|
||||
<div class="login-auth-links">
|
||||
<p><a href="{% url 'authentication:forgot_password' %}">Forgot your password?</a></p>
|
||||
<p><a href="{% url 'authentication:resend_verification' %}">Resend email verification</a></p>
|
||||
<p>Don't have an account? <a href="{% url 'authentication:register' %}">Create account</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user