{% extends "main.html" %}
{% block title %}{{ _("Expired Password Reset") }}{% 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('.password_reset', username=username) }}" method="post">
              <div class="card-body">
                <h5 id="pageheading">{{ _('Expired Password Reset for %(username)s', username=username) }}</h5>
                <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
                <div class="form-group">{{ macros.with_errors(password_reset_form.current_password, tabindex="2")}}</div>
                <div class="form-group">{{ macros.with_errors(password_reset_form.password, tabindex="3")}}</div>
                <div class="form-group">{{ macros.with_errors(password_reset_form.password_confirm, tabindex="4")}}</div>
                <div class="form-group">{{ macros.with_errors(password_reset_form.otp, tabindex="5")}}</div>
              </div>
              <div class="card-footer d-flex justify-content-between">
                <div>{{ macros.non_field_errors(password_reset_form) }}</div>
                <button class="btn btn-primary" id="submit" type="submit" tabindex="6">{{ _("Change Password") }}</button>
              </div>
            </form>
        </div>
      </div>
    </div> <!-- ./row -->
  </div>
{% endblock %}
