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

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

{% block content %}
{%  box "passwordreset" %}
{%   if validlink %}
      <form method="post" action=".">
       <h1 class="title">{% trans "Enter new password" %}</h1>
       <div class="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 %}
      <h1 class="title">{% trans "Password reset unsuccessful" %}</h1>
      <div class="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 %}
