{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}
    {% translate "Change Password" %}
{% endblock %}
{% block whitebox %}
    <h1 class="mb-5 text-3xl">
        {% if token_fail %}
            {% trans "Bad Token" %}
        {% else %}
            {% trans "Change Password" %}
        {% endif %}
    </h1>
    {% if token_fail %}
        <div class="px-4 py-3" role="alert">
            <strong class="font-bold">Invalid token!</strong>
            <span class="block text-black">
                {% url 'account_reset_password' as passwd_reset_url %}
                {% blocktrans %}The password reset link was invalid, possibly because it has already been used. <br>
        Please request a
        <a class="text-blue-400 hover:text-blue-500" href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}
            </span>
        </div>
    {% else %}
        {% if form %}
            <form method="POST" action="{{ action_url }}">
                {% include "account/_render_form.html" %}
                {% translate "Change password" as change_text %}
                {% include "account/_button.html" with text=change_text %}
            </form>
        {% else %}
            <p>{% trans 'Your password is now changed.' %}</p>
        {% endif %}
    {% endif %}
{% endblock %}
