{% extends "account/base.html" %}

{% block title %}{{ page_title(_("Change Password")) }}{% endblock %}

{% block content %}
    <h1>{% if token_fail %}{{ _("Bad Token" %}{% else %}{% trans "Change Password") }}{% endif %}</h1>

    {% if token_fail %}
        <p>{% trans passwd_reset_url=url('account_reset_password') %}The password reset link was invalid, possibly because it has already been used.  Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endtrans %}</p>
    {% else %}
        {% if form %}
            <form method="POST" action=".">
                {{ csrf() }}
                {{ form.as_p() }}
                <input type="submit" name="action" value="{{ _("Change password") }}"/>
            </form>
        {% else %}
            <p>{{ _("Your password is now changed.") }}</p>
        {% endif %}
    {% endif %}
{% endblock %}
