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

{% block title %}{% trans "Recover Password" %}{% endblock %}

{% block content %}
{%  box "passwordreset" %}
{%   if validlink %}
      <form method="post" action=".">
       <div class="box-head">
        <h1 class="box-title">{% trans "Enter new password" %}</h1>
       </div>
       <div class="box-main">
        <p>{% blocktrans %}Please enter your new password twice so we can
        verify you typed it in correctly.{% endblocktrans %}</p>
        <table>
         <tr>
          <td class="label"><label for="id_new_password1">{% trans "New password" %}</label></td>
          <td class="field">{{form.new_password1}}</td>
          <td class="hint">{{form.new_password1.errors}}</td>
         </tr>
         <tr>
          <td class="label"><label for="id_new_password2">{% trans "Confirm password" %}</label></td>
          <td class="field">{{form.new_password2}}</td>
          <td class="hint">{{form.new_password2.errors}}</td>
         </tr>
         <tr>
          <td class="label">&nbsp;</td>
          <td class="field"><input type="submit" value="{% trans "Change my password" %}" /></td>
          <td class="hint">&nbsp;</td>
         </tr>
        </table>
       </div>
      </form>
{%   else %}
      <div class="box-head">
       <h1 class="box-title">{% trans "Password reset unsuccessful" %}</h1>
      </div>
      <div class="box-main">
       {% url 'recover' as recover_url %}
       <p>{% blocktrans %}The password reset link was invalid, either because
       it expired or has already been used. Please request a new one
       <a href="{{recover_url}}">here</a>.{% endblocktrans %}</p>
      </div>
{%   endif %}
{%  endbox %}
{% endblock %}
