{% extends "account/base.html" %}
{% load static i18n %}

{% block head_title %}{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}{% endblock%}
{% block auth_title %}{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}{% endblock%}

{% block auth_body %}
  {% if token_fail %}
    {% url 'account_reset_password' as passwd_reset_url %}
    <p class="login-box-msg">{% blocktrans trimmed %}The password reset link was invalid, possibly because it has already been used.  Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
  {% else %}
    {% if form %}
      <p class="login-box-msg">
        {% blocktrans trimmed %}Make sure it's at least 15 characters OR at least 8 characters including a number and a lowercase letter.{% endblocktrans %}</a>
      </p>
      <form method="POST" action="{{ action_url }}">
        {% csrf_token %}
        {% include 'account/snippets/form_error_list.html' with errors=form.non_field_errors %}
        {% include 'account/snippets/form_control.html' with field=form.password1 %}
        {% include 'account/snippets/form_control.html' with field=form.password2 %}
        <button class="btn btn-primary w-100 mb-3" type="submit">{% trans "Reset My Password" %}</button>
      </form>
    {% else %}
      <p class="login-box-msg">{% trans 'Your password is now changed.' %}</p>
    {% endif %}
  {% endif %}
{% endblock %}

    