{% extends 'base.html' %}
{% block title %}Change Password - Astron Hosts LTD{% endblock %}
{% block content %}
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card shadow-lg rounded-4 border-0">
                <div class="card-body p-4">
                    <h3 class="fw-bold mb-4 text-center"><i class="bi bi-key me-2"></i>Change Password</h3>
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
                                {{ message }}
                                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                            </div>
                        {% endfor %}
                    {% endif %}
                    <form method="post" novalidate>
                        {% csrf_token %}
                        {{ form.non_field_errors }}
                        <div class="mb-3">
                            <label for="id_old_password" class="form-label">Old Password</label>
                            {{ form.old_password }}
                            {% for error in form.old_password.errors %}
                                <div class="invalid-feedback d-block">{{ error }}</div>
                            {% endfor %}
                        </div>
                        <div class="mb-3">
                            <label for="id_new_password1" class="form-label">New Password</label>
                            {{ form.new_password1 }}
                            {% for error in form.new_password1.errors %}
                                <div class="invalid-feedback d-block">{{ error }}</div>
                            {% endfor %}
                        </div>
                        <div class="mb-3">
                            <label for="id_new_password2" class="form-label">Confirm New Password</label>
                            {{ form.new_password2 }}
                            {% for error in form.new_password2.errors %}
                                <div class="invalid-feedback d-block">{{ error }}</div>
                            {% endfor %}
                        </div>
                        <button type="submit" class="btn btn-primary w-100">Change Password</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 