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

{% load crispy_forms_tags %}

{% block head_title %} - Change Password{% endblock %}

{% block content %}
  <div class="container">
    <div class="row">
      <div class="col-xs-12">
        <h2>{% if token_fail %}Bad Token{% else %}Change Password{% endif %}</h2>

        {% if token_fail %}
          {% url 'account_reset_password' as passwd_reset_url %}
          <p>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>.</p>
        {% else %}
          {% if form %}
            <form method="POST" action="./">{% csrf_token %}
              {{ form|crispy }}
              <button type="btn btn-default" name="action">change password</button>
            </form>
          {% else %}
            <p>Your password is now changed.</p>
          {% endif %}
        {% endif %}
      </div>
    </div>
  </div>
{% endblock %}
