72 lines
2.9 KiB
HTML
72 lines
2.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
{% load crispy_forms_tags %}
|
|
|
|
{% block title %}{% trans "Change Password" %} - ATS{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex items-center justify-center min-h-screen py-8 px-4">
|
|
<div class="w-full max-w-lg bg-white rounded-xl shadow-sm border border-gray-200 p-8">
|
|
|
|
<!-- Header -->
|
|
<div class="text-center mb-6">
|
|
<div class="inline-flex items-center justify-center w-16 h-16 rounded-full mb-4"
|
|
style="background-color: rgba(157, 34, 53, 0.1);">
|
|
<i class="fas fa-lock text-2xl" style="color: #9d2235;"></i>
|
|
</div>
|
|
<h2 class="text-2xl font-bold mb-2">
|
|
{% trans "Change Password" %}
|
|
</h2>
|
|
<p class="text-gray-500 text-sm">
|
|
{% trans "Please enter your current password and a new password to secure your account." %}
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Messages -->
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="mb-4 px-4 py-3 rounded-lg text-sm
|
|
{% if message.tags == 'error' %}bg-red-50 text-red-800{% elif message.tags == 'success' %}bg-green-50 text-green-800{% else %}bg-blue-50 text-blue-800{% endif %}"
|
|
role="alert">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<!-- Form -->
|
|
<form method="POST" action="{% url 'set_staff_password' user.pk %}" class="space-y-4">
|
|
{% csrf_token %}
|
|
{{ form|crispy }}
|
|
|
|
{% if form.non_field_errors %}
|
|
<div class="px-4 py-3 bg-red-50 text-red-800 rounded-lg text-sm mt-3" role="alert">
|
|
{% for error in form.non_field_errors %}{{ error }}{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Submit Button -->
|
|
<button type="submit"
|
|
class="w-full inline-flex items-center justify-center gap-2 px-4 py-3 rounded-lg font-medium transition-all duration-200"
|
|
style="background-color: #9d2235; color: white;"
|
|
onmouseover="this.style.backgroundColor='#7a1a29'"
|
|
onmouseout="this.style.backgroundColor='#9d2235'">
|
|
<i class="fas fa-key"></i>
|
|
<span>{% trans "Change Password" %}</span>
|
|
</button>
|
|
</form>
|
|
|
|
<!-- Back Link -->
|
|
<div class="pt-4 mt-4 text-center border-t border-gray-200">
|
|
<p class="text-gray-500 text-sm">
|
|
<i class="fas fa-arrow-left mr-2"></i>
|
|
<a href="{% url 'admin_settings' %}"
|
|
class="hover:text-gray-700 transition-colors"
|
|
style="color: #9d2235;">
|
|
{% trans "Back to Settings" %}
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |