{% extends "base.html" %}

{% block page_class %}page-narrow{% endblock %}

{% block subtitle %}
<p class="sub">Reset your password</p>
{% endblock %}

{% block content %}
  <section class="card">
    <h2 class="card-title">Forgot password</h2>
    {% if sent %}
      <div class="status ok">If that email is on an account, a reset link is on its way.</div>
      <p class="sub" style="margin-top: 14px;">Nothing arriving? The server's
        SMTP settings may not be configured yet -- ask your admin.</p>
    {% else %}
      {% if error %}<div class="status err">{{ error }}</div>{% endif %}
      <p class="sub">Enter the email on your account and we'll send a reset link.</p>
      <form method="post" action="/forgot-password">
        <label>Email
          <input type="email" name="email" required autofocus autocomplete="email">
        </label>
        <button type="submit">Send reset link</button>
      </form>
    {% endif %}
    <p class="sub" style="margin-top: 14px;"><a href="/login">Back to log in</a></p>
  </section>
{% endblock %}
