98 lines
4.2 KiB
HTML
98 lines
4.2 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
{% get_current_language_bidi as LANGUAGE_BIDI %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
<!DOCTYPE html>
|
|
<html lang="{{LANGUAGE_CODE}}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% trans "Change Password" %} - KAAUH ATS</title>
|
|
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script src="https://unpkg.com/lucide@latest"></script>
|
|
|
|
<script>
|
|
tailwind.config = {
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
'temple-red': '#9d2235',
|
|
'temple-dark': '#1a1a1a',
|
|
'temple-cream': '#f8f7f2',
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
|
|
body { font-family: 'Inter', sans-serif; }
|
|
</style>
|
|
</head>
|
|
<body class="bg-temple-cream min-h-screen flex items-center justify-center p-6">
|
|
|
|
<div class="w-full max-w-md">
|
|
<div class="bg-white rounded-2xl shadow-xl border border-gray-100 p-8">
|
|
|
|
<div class="text-center mb-8">
|
|
<div class="inline-flex items-center justify-center w-20 h-20 rounded-full bg-temple-red/10 mb-4">
|
|
<i data-lucide="lock" class="w-10 h-10 text-temple-red"></i>
|
|
</div>
|
|
<h1 class="text-2xl font-bold text-gray-900">{% trans "Change Password" %}</h1>
|
|
<p class="text-sm text-gray-500 mt-2">
|
|
{% trans "Please enter your current password and a new password to secure your account." %}
|
|
</p>
|
|
</div>
|
|
|
|
<form method="post" action="{% url 'account_change_password' %}" class="space-y-6">
|
|
{% csrf_token %}
|
|
|
|
{% if form.non_field_errors %}
|
|
<div class="p-4 bg-red-50 text-red-700 rounded-xl" role="alert">
|
|
{% for error in form.non_field_errors %}{{ error }}{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for field in form %}
|
|
<div>
|
|
<label for="id_{{ field.name }}" class="block text-sm font-semibold text-gray-700 mb-2">
|
|
{{ field.label }}
|
|
</label>
|
|
<div class="relative">
|
|
<i data-lucide="lock" class="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"></i>
|
|
{{ field }}
|
|
</div>
|
|
{% if field.errors %}
|
|
<p class="mt-1 text-xs text-red-600">{{ field.errors.0 }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<button type="submit"
|
|
class="w-full bg-temple-red hover:bg-[#7a1a29] text-white font-semibold py-4 rounded-xl text-sm transition shadow-md hover:shadow-lg flex items-center justify-center gap-2">
|
|
<i data-lucide="lock" class="w-5 h-5"></i>
|
|
{% trans "Change Password" %}
|
|
</button>
|
|
</form>
|
|
|
|
<div class="mt-6 pt-6 text-center border-t border-gray-200">
|
|
<p class="text-gray-600 text-sm">
|
|
<i data-lucide="arrow-left" class="w-4 h-4 inline-block mr-1 align-text-bottom"></i>
|
|
<a href="{% url 'user_detail' request.user.pk %}" class="text-temple-red hover:text-temple-red/80 transition font-medium">{% trans "Return to Profile" %}</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
lucide.createIcons();
|
|
|
|
// Add Tailwind classes to password inputs
|
|
document.querySelectorAll('input[type="password"]').forEach(input => {
|
|
input.classList.add('w-full', 'pl-10', 'pr-4', 'py-3.5', 'border', 'border-gray-200', 'rounded-xl', 'text-sm', 'focus:ring-2', 'focus:ring-temple-red/20', 'focus:border-temple-red', 'outline-none', 'transition');
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |