{% extends 'oscar/layout.html' %}
{% load i18n %}
{% block title %}
    {% trans 'Enter a new password' %} | {{ block.super }}
{% endblock %}
{% block breadcrumbs %}
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item">
                <a href="{{ homepage_url }}">{% trans 'Home' %}</a>
            </li>
            <li class="breadcrumb-item">
                <a href="{% url 'password-reset' %}">
                    {% trans 'Password reset' %}
                </a>
            </li>
            <li class="breadcrumb-item active" aria-current="page">
                {% trans 'Enter a new password' %}
            </li>
        </ol>
    </nav>
{% endblock %}
{% block headertext %}
    {% trans "Enter a new password" %}
{% endblock %}
{% block content %}
    {% if validlink %}
        <p>
            {% trans "Please enter your new password twice so we can verify you typed it in correctly." %}
        </p>
        <form id="password_reset_form" method="post">
            {% csrf_token %}
            {% include 'oscar/partials/form_fields.html' %}
            <div class="form-group form-actions">
                <button class="btn btn-primary btn-lg" type="submit" data-loading-text="{% trans 'Changing...' %}">
                    {% trans 'Change my password' %}
                </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 %}
