Internal
Public Access
Replace all hardcoded colors and CSS variable fallbacks with proper theme CSS variables: - Removed fallback values from all var() calls - Replaced --color-* prefixed variables with actual theme variables: - --color-bg-secondary → --surface - --color-border → --border - --color-text → --text-primary - --color-text-secondary → --text-secondary - --color-primary → --accent (via .btn-primary class) - Updated success alert to use .alert-success class - Updated buttons to use .btn-primary and .btn-secondary classes - Fixed input backgrounds and text colors to use theme variables - Replaced hardcoded error color with --danger variable The page now properly respects the dark/light mode toggle. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
88 lines
4.9 KiB
HTML
88 lines
4.9 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block title %}Change Password - KeepItGoing{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="app-layout" style="display: flex; min-height: 100vh;">
|
|
<!-- Simple header for non-dashboard pages -->
|
|
<div style="position: fixed; top: 0; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 2rem; z-index: 100; display: flex; justify-content: space-between; align-items: center;">
|
|
<a href="{% url 'dashboard' %}" style="font-size: 1.25rem; font-weight: 600; text-decoration: none; color: var(--text-primary);">KeepItGoing</a>
|
|
<div style="display: flex; gap: 1rem; align-items: center;">
|
|
<span style="color: var(--text-secondary);">{{ user.email }}</span>
|
|
<a href="{% url 'profile' %}" style="color: var(--accent); text-decoration: none;">Profile</a>
|
|
<a href="{% url 'logout' %}" style="color: var(--text-secondary); text-decoration: none;">Logout</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Main content -->
|
|
<div style="flex: 1; padding: 5rem 2rem 2rem; max-width: 600px; margin: 0 auto; width: 100%;">
|
|
<h1 style="font-size: 2rem; font-weight: 700; margin-bottom: 2rem; color: var(--text-primary);">Change Password</h1>
|
|
|
|
{% if success %}
|
|
<div class="alert alert-success" style="margin-bottom: 1.5rem;">
|
|
<strong>✓ Success!</strong><br>
|
|
{{ success }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form method="post" style="background: var(--surface); padding: 2rem; border-radius: 0.5rem; border: 1px solid var(--border);">
|
|
{% csrf_token %}
|
|
|
|
<div style="margin-bottom: 1.5rem;">
|
|
<label for="old_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary);">Current Password</label>
|
|
<input type="password"
|
|
id="old_password"
|
|
name="old_password"
|
|
required
|
|
style="width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 1rem; background: var(--bg); color: var(--text-primary);">
|
|
{% if errors.old_password %}
|
|
<p style="color: var(--danger); margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.old_password }}</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div style="margin-bottom: 1.5rem;">
|
|
<label for="new_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary);">New Password</label>
|
|
<input type="password"
|
|
id="new_password"
|
|
name="new_password"
|
|
required
|
|
minlength="8"
|
|
style="width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 1rem; background: var(--bg); color: var(--text-primary);">
|
|
<p style="color: var(--text-secondary); margin-top: 0.25rem; font-size: 0.875rem;">Must be at least 8 characters</p>
|
|
{% if errors.new_password %}
|
|
<p style="color: var(--danger); margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.new_password }}</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div style="margin-bottom: 1.5rem;">
|
|
<label for="confirm_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary);">Confirm New Password</label>
|
|
<input type="password"
|
|
id="confirm_password"
|
|
name="confirm_password"
|
|
required
|
|
minlength="8"
|
|
style="width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 1rem; background: var(--bg); color: var(--text-primary);">
|
|
{% if errors.confirm_password %}
|
|
<p style="color: var(--danger); margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.confirm_password }}</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div style="display: flex; gap: 1rem;">
|
|
<button type="submit" class="btn btn-primary"
|
|
style="flex: 1; padding: 0.75rem 1.5rem; font-size: 1rem;">
|
|
Change Password
|
|
</button>
|
|
<a href="{% url 'profile' %}" class="btn btn-secondary"
|
|
style="flex: 1; padding: 0.75rem 1.5rem; font-size: 1rem; text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center;">
|
|
Cancel
|
|
</a>
|
|
</div>
|
|
</form>
|
|
|
|
<div style="margin-top: 2rem; text-align: center;">
|
|
<a href="{% url 'dashboard' %}" style="color: var(--text-secondary); text-decoration: none; font-size: 0.875rem;">← Back to Dashboard</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|