{% 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">Set a new password</h2>
    {% if error %}<div class="status err">{{ error }}</div>{% endif %}
    {% if valid %}
      <form method="post" action="/reset-password/{{ token }}">
        <label>New password
          <input type="password" name="password" minlength="8" required autofocus autocomplete="new-password">
        </label>
        <button type="submit">Set password</button>
      </form>
    {% else %}
      <p class="sub">This reset link is invalid or has expired -- links are
        only good for an hour.</p>
      <p class="sub" style="margin-top: 14px;"><a href="/forgot-password">Request a new one</a></p>
    {% endif %}
  </section>
{% endblock %}
