{% extends "lfs/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password reset' %}{% endblock %}
{% block section %}password-reset-confirm{% endblock %}

{% block breadcrumbs %}
    <ul class="breadcrumbs">
        <li>{% trans 'You are here:' %}</li>
        <li>
            <a href="{% url lfs_shop_view %}">
                {% trans 'Home' %}</a> &gt;
        </li>
        <li>
            {% trans "Password reset" %}
        </li>
    </ul>
{% endblock %}

{% block wrapper %}
    {% if validlink %}
        <h1 class="first-heading">
            {% 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 %}
            <div class="field">
                <div class="label">
                    <label>{% trans 'New password:' %}</label>
                </div>
                <div>
                    {{ form.new_password1.errors }}
                    {{ form.new_password1 }}
                </div>
            </div>
            <div>
                <div class="label">
                    <label>{% trans 'Confirm password:' %}</label>
                </div>
                <div>
                    {{ form.new_password2.errors }}
                    {{ form.new_password2 }}
                </div>
            </div>
            <div class="buttons">
                <input type="submit" value="{% trans 'Change my password' %}" />
            </div>
        </form>
    {% else %}
        <h1 class="first-heading">
            {% 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 %}
