{% extends 'base.html' %}{% load i18n %}
{% block preloader %}{% endblock %}
{% block topbar %}{% endblock %}
{% block menu %}{% endblock %}
{% block body %}
    <article class="center-stage">
        <h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>

        {% if token_fail %}
            {% url "acct_passwd_reset" as passwd_reset_url %}
            <p>{% blocktrans %}The password reset link is invalid, probably because it has already been used.{% endblocktrans %}</p>
        {% else %}
            {% if form %}
                <form method="POST" action="">
                    {% csrf_token %}
                    <fieldset>
                        {% for field in form %}
                        <div class="form-group field-{{ field.name }}">
                            {{ field.errors }}
                            {{ field.label_tag }}
                            <p>{{ field }}</p>
                        </div>
                    {% endfor %}
                    </fieldset>
                    <p>
                         <button type="submit" class="btn btn-success">{% trans "Change Password" %}</button>
                    </p>
                </form>
            {% else %}
                <p>{% trans "You successfully changed your password!" %}</p>
                <p><a href="{% url "ui:index" %}">{% trans "Go to the homepage to login" %}</a></p>
            {% endif %}
        {% endif %}
    </article>
{% endblock %}
