{% extends "registration/registration_base.html" %}
{% load url from future %}
{% load i18n %}

{% block masthead %}
{% if validlink %}
    <h2>{% trans "Enter new password" %}</h2>
{% else %}
    <h2>{% trans "Error resetting password" %}</h2>
{% endif %}
{% endblock %}

{% block content %}
{% if validlink %}
    <p>{% trans "Please enter your new password twice." %}</p>
    <form method="post" action=".">
        {% csrf_token %}
        {{ form.non_field_errors }}
        {% for field in form %}
            <div class="fieldWrapper">
                {{ field.errors }}
                {{ field.label_tag }}
                {{ field }}
            </div>
        {% endfor %}
        <input type="submit" value="{% trans 'Change my password' %}">
    </form>
{% else %}
    <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
{% endblock %}
