{% extends 'registration/registration_base.html' %}

{% block title %}Confirm password{% endblock %}

{% block registration_block %}

  {% if validlink %}

    <p>Please enter your new password twice so we can verify you typed it in correctly.</p>
    <br>
    <input type="password" class="form-control" placeholder="New password"
           id="id_new_password1" name="new_password1"
           value="{% firstof form.new_password1.value '' %}">
    <div class="error-field"> {{ form.new_password1.errors.0 }} </div>
    <br>
    <input type="password" class="form-control" placeholder="Confirm new password"
           id="id_new_password2" name="new_password2"
           value="{% firstof form.new_password2.value '' %}">
    <div class="error-field"> {{ form.new_password2.errors.0 }} </div>
    <br>
    <div class="error-non-field"> {{ form.non_field_errors.0 }} </div>
    <button class="btn btn-block btn-primary" type="submit"><i class="fa fa-lock"></i> CHANGE PASSWORD</button>

  {% else %}

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

  {% endif %}

{% endblock registration_block %}
