{% extends "main.html" %}
{% block title %}{{ _("Password Recovery") }}{% endblock %}

{% block content %}
  {{ super() }}

{% import '_form_macros.html' as macros %}

  <div class="container py-4">
    <div class="row">
      <div class="col-6 mx-auto">
        <div class="card">
          <form action="{{ url_for('.forgot_password_ask') }}" method="post" novalidate>
            {{ form.csrf_token }}
            <div class="card-body">
              <h5 id="pageheading">{{_("Did you forget your password?") }}</h5>
              <p>{{ _("Enter your username and an email will be sent to your address with further instructions.") }}</p>
              <div class="form-group mb-0">{{ macros.with_errors(form.username, autofocus="true")}}</div>
            </div>
            <div class="card-footer d-flex justify-content-between">
              <div>{{ macros.non_field_errors(form) }}</div>
              <button class="btn btn-primary" id="submit" type="submit">{{ _("Send") }}</button>
            </div>
          </form>
        </div>
      </div>
    </div> <!-- ./row -->
  </div>
  {{ lost_otp_token() if lost_otp_token is defined }}
{% endblock %}
