{% extends 'layout/base.html' %}
{% from 'forms/_form.html' import form_header, form_rows, form_footer  %}

{% block page_class %}fixed-width-standalone-page{% endblock %}
{% block title %}
    {% trans %}Reset your Indico password{% endtrans %}
{% endblock %}

{% block content %}
    {% include 'flashed_messages.html' %}

    {% if not email_sent or identity %}
        {% if not identity %}
        <p>
            {% trans -%}
                If you forgot your password you can reset it. Simply enter your email address and
                we'll send you an email containing with information on how to set a new password.
            {%- endtrans %}
        </p>
        {% endif %}

        {{ form_header(form) }}
        {{ form_rows(form, widget_attrs=widget_attrs) }}
        {{ template_hook('below-reset-password-form') }}
        {% call form_footer(form) %}
            {% if identity %}
                <input class="i-button big highlight" type="submit" value="{% trans %}Change my password{% endtrans %}">
            {% else %}
                <input class="i-button big highlight" type="submit" value="{% trans %}Submit{% endtrans %}">
            {% endif %}
        {% endcall %}
    {% endif %}
{% endblock %}
