{% extends "base.html" %}
{% block content %}
<div class="container mt-4">
    <h1>Change Password</h1>
    {% if current_user.force_password_change %}
        <p class="text-warning">You must change your password before continuing.</p>
    {% endif %}
    <form method="POST">
        {{ form.hidden_tag() }}
        <div class="mb-3">
            {{ form.current_password.label(class="form-label") }}
            {{ form.current_password(class="form-control") }}
            {% for error in form.current_password.errors %}
                <span class="text-danger">{{ error }}</span>
            {% endfor %}
        </div>
        <div class="mb-3">
            {{ form.new_password.label(class="form-label") }}
            {{ form.new_password(class="form-control") }}
            {% for error in form.new_password.errors %}
                <span class="text-danger">{{ error }}</span>
            {% endfor %}
        </div>
        <div class="mb-3">
            {{ form.confirm_password.label(class="form-label") }}
            {{ form.confirm_password(class="form-control") }}
            {% for error in form.confirm_password.errors %}
                <span class="text-danger">{{ error }}</span>
            {% endfor %}
        </div>
        {{ form.submit(class="btn btn-primary") }}
    </form>
</div>
{% endblock %}