{% extends "_layout.html.j2" %}

{%- block title -%}
Reset your password
{%- endblock -%}

{%- block content -%}
{% match body %}
    {% when ResetPasswordBody::Form(_) %}
<div class="panel">
    {% when ResetPasswordBody::Unavailable %}
<div class="panel middle"/>
{% endmatch %}
    <h1>Reset your password</h1>
    {% match body %}
        {% when ResetPasswordBody::Form(form) %}
            <p>
                To reset your password, enter your email below. If your Matrix account has an associated email address,
                you will receive an email with a link to reset your password.
            </p>
            <p>
                If your Matrix account does not have an associated email address, contact your homeserver's administrator
                to reset your password.
            </p>
            {{ form }}
        {% when ResetPasswordBody::Unavailable %}
            <p>
                To reset your password, contact your homeserver's administrator.
            </p>
            <a href="{{ crate::ROUTE_PREFIX }}/account/">Back to account settings</a>
    {% endmatch %}
</div>
{%- endblock -%}
