{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2024 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}

{% extends "base.html" %}

{% block content %}
  <header class="page-heading">
    <div class="icon">
      {{ icon.email_solid() }}
    </div>

    <div class="header">
      <h1 class="title">{{ _("mas.recovery.start.heading") }}</h1>
      <p class="text">{{ _("mas.recovery.start.description") }}</p>
    </div>
  </header>

  <form class="cpd-form-root" method="POST">
    {% if form.errors is not empty %}
      {% for error in form.errors %}
        <div class="text-critical font-medium">
        {{ errors.form_error_message(error=error) }}
        </div>
      {% endfor %}
    {% endif %}

    <input type="hidden" name="csrf" value="{{ csrf_token }}" />

    {% call(f) field.field(label=_("common.email_address"), name="email", form_state=form) %}
      <input {{ field.attributes(f) }} class="cpd-text-control" type="email" autocomplete="email" required />
    {% endcall %}

    {{ button.button(text=_("action.continue"), type="submit") }}
  </form>
{% endblock content %}
