{%extends "base/page.html"%}
{% load pgfilters %}
{%block title%}Change password{%endblock%}
{%block contents%}
<h1>Change password <i class="fas fa-lock"></i></h1>
<p>
From this form you can change the password of your community account.
</p>

<form action="." method="post" id="login-form">
  {% csrf_token %}
  <div class="form-group row">
    {% if form.old_password.errors %}
      {% for e in form.old_password.errors %}
        <div class="col-lg-12 alert alert-danger">{{e}}</div>
      {% endfor %}
    {% endif %}
    <label class="col-form-label col-sm-3" for="id_old_password">Old Password:</label>
    <div class="col-sm-9">
      {{ form.old_password|field_class:"form-control" }}
    </div>
  </div>
  <div class="form-group row">
    {% if form.old_password.errors %}
      {% for e in form.new_password1.errors %}
        <div class="col-lg-12 alert alert-danger">{{e}}</div>
      {% endfor %}
    {% endif %}
    <label class="col-form-label col-sm-3" for="id_new_password1">New Password:</label>
    <div class="col-sm-9">
      {{ form.new_password1|field_class:"form-control" }}
    </div>
  </div>
  <div class="form-group row">
    {% if form.new_password2.errors %}
      {% for e in form.new_password2.errors %}
        <div class="col-lg-12 alert alert-danger">{{e}}</div>
      {% endfor %}
    {% endif %}
    <label class="col-form-label col-sm-3" for="id_new_password2">Confirm New Password:</label>
    <div class="col-sm-9">
      {{ form.new_password2|field_class:"form-control" }}
    </div>
  </div>
  <div class="submit-row">
    <label>&nbsp;</label><input class="btn btn-primary" type="submit" value="Change Password" />
  </div>
</form>

{%endblock%}
