{% extends 'django_spire/auth/page/auth_page.html' %}

{% block base_title %}Password Reset{% endblock %}

{% block authentication_page_content %}
    <h3>Password Reset</h3>
    {% if token_fail %}
        <p>The password reset link was invalid, possibly because it has already been used. Please request a
            <a href="{% url 'user_account_reset_password' %}">new password reset</a>
        </p>
    {% else %}
        {% if form %}
            <form x-data="{
                email: new GlueCharField('email', {required: true})
            }" method="post" class="text-app-secondary">
                {% csrf_token %}
                <div class="row">
                    <div class="col">
                        {% include 'django_glue/form/field/char_field.html' with glue_field='email' %}
                    </div>
                </div>
                <div class="row mt-2">
                    <div class="col">
                        <button type="submit" class="w-100 btn btn-app-primary bg-app-primary mt-2">Submit</button>
                    </div>
                </div>
            </form>
        {% else %}
            <p>Your password is now changed</p>
        {% endif %}
    {% endif %}
{% endblock %}
