{% extends "auth_layout.html" %}

{% block head_title %}{{ _('Forgot password') }}{% endblock %}

{% block title %}{{ _('Forgot password') }}{% endblock %}

{% block auth_form %}
  <form method="POST" action="{{ tenant.url_for(request, 'reset:forgot.post') }}">
    <div class="space-y-4">
      <div>
        <label class="block text-sm font-medium mb-1" for="input-email">{{ _('Email address') }}</label>
        <input id="input-email" class="form-input w-full" type="email" name="email" required />
        {% if form_errors is defined and form_errors.email %}
        <div id="errors-email" class="text-xs mt-1 text-red-500">{{form_errors.email}}</div>
        {% endif %}
      </div>
    </div>
    {% block csrf %}{{ super() }}{% endblock %}
    <div class="flex items-center justify-between mt-6">
      <div class="mr-1">
        <a class="text-sm underline hover:no-underline" href="{{ tenant.url_for(request, 'auth:login.get') }}">{{ _('I remember my password') }}</a>
      </div>
      <button type="submit" class="btn bg-primary hover:bg-primary-hover text-white ml-3">{{ _('Send me a reset link') }}</button>
    </div>
  </form>
{% endblock %}
