{% extends 'base_structure/layout/base_authentication_template.html' %}
{% load i18n static %}
{% block content %}

<div class="card mt-3 mb-3">
    <div class="card-header">
        <h3 class="text-center font-weight-light my-4">Password Reset Confirm</h3>
        {% include 'base_structure/elements/message.html' %}
    </div>
    <div class="card-body">
        {% if validlink %}
        <form method="post">
            {% csrf_token %}
            <div class="form-group">
                <input type="hidden" class="form-control" id="id_username" name="username"
                    value="{{ form.user.get_username }}" autocomplete="username">
            </div>
            <div class="form-group">
                {{ form.new_password1.errors }}
                <label for="id_new_password1">{% translate 'New password:' %}</label>
                <input type="password" class="form-control" id="id_new_password1" name="new_password1">
            </div>
            <div class="form-group">
                {{ form.new_password2.errors }}
                <label for="id_new_password2">{% translate 'Confirm password:' %}</label>
                <input type="password" class="form-control" id="id_new_password2" name="new_password2">
            </div>
            <button type="submit" class="btn btn-primary mt-4">{% translate 'Change my password' %}</button>
        </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 %}
    </div>
</div>

{% endblock content%}

{% block javascript %}
<!-- include required js cdn link through html here -->

{% endblock %}
