{% extends "base.html" %}
{% load i18n towel_form_tags %}

{% block title %}{% trans "Password reset" %} - {{ block.super }}{% endblock %}

{% block main %}
<div class="row">
  <div class="large-6 large-centered columns">
    <h1>{% trans "Password reset" %}</h1>
    {% include "towel/_messages.html" %}
    {% if validlink %}
      <form action="" method="post">
        <h2>{% trans 'Enter new password' %}</h2>
        <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>

        {% csrf_token %}
        {% form_errors form %}
        {% form_item form.new_password1 %}
        {% form_item form.new_password2 %}

        <button type="submit" class="button">
          {% trans "Change my password" %}</button>
      </form>
    {% else %}
      <h2>{% trans 'Password reset unsuccessful' %}</h2>
      <p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
    {% endif %}
  </div>
</div>
{% endblock %}
