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

{% block body %}

<div class="container mt-5">

  {% block content %}
  <div class="card w-50">
    <div class="card-body">

      {% block content_title %}<h1>{{ title }}</h1>{% endblock %}

      {% if validlink %}

      <p>{% trans "Please enter your new password twice." %}</p>

      <form method="post">{% csrf_token %}
        <table>
          <tr>
            <td>
              {{ form.new_password1.errors }}
            </td>
            <td>
              <label for="id_new_password1">{% trans 'New password:' %}</label>
            </td>
            <td>
              {{ form.new_password1 }}
            </td>
          </tr>
          <tr>
            <td>
              {{ form.new_password2.errors }}
            </td>
            <td>
              <label for="id_new_password2">{% trans 'Confirm password:' %}</label>
            </td>
            <td>
              {{ form.new_password2 }}
            </td>
          </tr>
        </table>
        <input type="submit" value="{% trans 'Change my password' %}" class="btn btn-primary" />
      </form>

      {% else %}

      <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 %}

</div>

{% endblock %}
