{% extends "admin/base_site.html" %}
{% load static i18n wpadmin_tags %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; {% trans 'Password reset confirmation' %}
</div>
{% endblock %}

{% block title %}{% trans 'Password reset' %} | {% wpadmin_render_custom_title %}{% endblock %}

{% block content %}

{% if validlink %}

<h1>{% trans 'Enter new password' %}</h1>

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

<form action="" method="post">{% csrf_token %}

{% if form.errors %}
    <p class="errornote">
    {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
    </p>
{% endif %}

<fieldset class="module aligned wide">

<div class="form-row {% if form.new_password1.errors %}errors{% endif %}">
    <div>
        {{ form.new_password1.errors }}
        <label class="required" for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}
    </div>
</div>

<div class="form-row {% if form.new_password2.errors %}errors{% endif %}">
    <div>
        {{ form.new_password2.errors }}
        <label class="required" for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}
    </div>
</div>

</fieldset>

<div id="bottombar"><button type="submit" title="{% trans 'Change my password' %}"><i class="fa fa-lg fa-floppy-o"></i> <span class="text">{% trans 'Change my password' %}</span></button></div>

</form>

{% else %}

<h1>{% trans 'Password reset unsuccessful' %}</h1>

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

{% endif %}

{% endblock %}
