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

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

{% block auth_content %}
{%  if validlink %}
<div class="auth-header">
 <h1>{% trans "Change Your Password" %}</h1>
 <p>
{%   blocktrans %}
  Please enter your new password twice so we can verify it's correct.
{%   endblocktrans %}
 </p>
</div>

<form method="post" action="." class="auth-section main-auth-section">
{%   csrf_token %}

 <div class="auth-form-row auth-field-row">
  <label for="id_new_password1">{% trans "New password:" %}</label>
  {{form.new_password1}}
  {{form.errors.new_password1}}
 </div>

 <div class="auth-form-row auth-field-row">
  <label for="id_new_password2">{% trans "Confirm password:" %}</label>
  {{form.new_password2}}
  {{form.errors.new_password2}}
 </div>

 <div class="auth-form-row">
  <div class="auth-button-container">
   <input type="submit" class="primary"
          value="{% trans "Change my password" %}" />
  </div>
 </div>
</form>
{%  else %}
<div class="auth-header">
 <h1>{% trans "Password Reset Unsuccessful" %}</h1>
</div>

<p>
{%   url 'recover' as recover_url %}
{%   blocktrans %}
 The password reset link was invalid, either because it expired or has already
 been used. Please <a href="{{recover_url}}">request a new one</a>.
{%   endblocktrans %}
</p>
{%  endif %}
{% endblock auth_content %}
