{% extends "admin/base_site.html" %}
{% load i18n static %}

{% block title %}{% if form.new_password1.errors or form.new_password2.errors %}{% translate "Error:" %} {% endif %}{{ block.super }}{% endblock %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block breadcrumbs %}
<ol class="breadcrumbs">
<li><a href="{% url 'admin:index' %}">{% translate 'Home' %}</a></li>
<li aria-current="page">{% translate 'Password reset confirmation' %}</li>
</ol>
{% endblock %}

{% block content %}

{% if validlink %}

<p>{% translate "Please enter your new password twice so we can verify you typed it in correctly." %}</p>

<form method="post">{% csrf_token %}
  <fieldset class="module aligned">
    <input class="hidden" autocomplete="username" value="{{ form.user.get_username }}">
    <div class="form-row field-password1">
      {{ form.new_password1.errors }}
      <div class="flex-container">
        <label for="id_new_password1">{% translate 'New password:' %}</label>
        {{ form.new_password1 }}
      </div>
    </div>
    <div class="form-row field-password2">
      {{ form.new_password2.errors }}
      <div class="flex-container">
        <label for="id_new_password2">{% translate 'Confirm password:' %}</label>
        {{ form.new_password2 }}
      </div>
    </div>
  </fieldset>
  <div class="submit-row">
    <input type="submit" value="{% translate 'Change my password' %}">
  </div>
</form>

{% else %}

<p>{% translate "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>

{% endif %}

{% endblock %}
