{% extends "main.html" %}
{% block title %}{{ _("Reset Password") }}{% 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_change') }}?token={{ token }}" method="post" novalidate>
          {{ form.csrf_token }}
          <div class="card-body">
            <h5 id="pageheading">{{ _('Password Reset for %(username)s', username=username) }}</h5>
            <div class="form-group">{{ macros.with_errors(form.password, tabindex="1")}}</div>
            <div class="form-group">{{ macros.with_errors(form.password_confirm, tabindex="2")}}</div>
            <div class="form-group">{{ macros.with_errors(form.otp, tabindex="3")}}</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" tabindex="4">{{ _("Reset Password") }}</button>
          </div>
        </form>
      </div>
    </div> <!-- ./row -->
  </div>
{% endblock %}
