{% extends 'base.html' %}

{% block title %}Change Password - PixelMinds{% endblock %}

{% block content %}
<section class="section">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-6">
                <div class="card shadow-lg border-0 rounded-lg mt-5">
                    <div class="card-header"><h3 class="text-center font-weight-light my-4">Change Password</h3></div>
                    <div class="card-body">
                        <form method="post">
                            {% csrf_token %}
                            {% if form.non_field_errors %}
                                <div class="alert alert-danger" role="alert">
                                    {% for error in form.non_field_errors %}
                                        {{ error }}
                                    {% endfor %}
                                </div>
                            {% endif %}

                            {% for field in form %}
                                <div class="mb-3">
                                    <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
                                    {{ field }}
                                    {% if field.help_text %}
                                        <small class="form-text text-muted">{{ field.help_text|safe }}</small>
                                    {% endif %}
                                    {% for error in field.errors %}
                                        <div class="invalid-feedback d-block">
                                            {{ error }}
                                        </div>
                                    {% endfor %}
                                </div>
                            {% endfor %}

                            <div class="d-grid">
                                <button type="submit" class="btn btn-primary btn-lg">Change My Password</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{% endblock %}
