{% extends "account/base.html" %}

{% load i18n %}
{% load django_bootstrap5 %}

{% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block title %}{% trans "Change Password" %}{% endblock %}

{% block accounts_content %}
  <div class="header_custom">
    <div class="branding_custom">
      <h1 class="site-name_custom">
        <a>
          {% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}
        </a>
      </h1>
    </div>
  </div>
  <div class="main_form">
    {% if token_fail %}
      {% url 'account_reset_password' as passwd_reset_url %}
      <p>{% blocktrans %}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 %}
        <form method="POST" action="{{ action_url }}">
          {% csrf_token %}
          {% bootstrap_form form %}
          <input type="submit" name="action" value="{% trans 'Change password' %}"/>
        </form>
      {% else %}
        <p>{% trans 'Your password is now changed.' %}</p>
      {% endif %}
    {% endif %}
  </div>
{% endblock %}
