{% extends "layouts/content.html" %}
{% load i18n %}

{% block title %}{% trans "Password reset" %}{% endblock %}

{% block content %}
{% if validlink %}
<div class="row">
  <div class="col-md-12">
    <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
    <form class="form-horizontal" action="." method="post">
      {% csrf_token %}
      <div class="form-group{% if form.new_password1.errors %} has-error{% endif %}">
        <label class="col-md-4 control-label" for="id_new_password1">{% trans "New password:" %}</label>
        <div class="col-md-4">
          {{ form.new_password1 }}
          {% for error in form.new_password1.errors %}
          <p class="help-block">{{ error }}</p>
          {% endfor %}
        </div>
      </div>
      <div class="form-group{% if form.new_password2.errors %} has-error{% endif %}">
        <label class="col-md-4 control-label" for="id_new_password2">{% trans "Confirm password:" %}</label>
        <div class="col-md-4">
          {{ form.new_password2 }}
          {% for error in form.new_password2.errors %}
          <p class="help-block">{{ error }}</p>
          {% endfor %}
        </div>
      </div>

      <div class="form-group">
        <div class="col-md-8 col-md-offset-4">
          <button type="submit" class="btn btn-primary">{% trans "Change my password" %}</button>
        </div>
      </div>
    </form>
  </div>
</div>
{% 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 content %}
