{% extends "registration/registration_base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load widget_tweaks %}

{% block title %}{% trans "Change password" %}{% endblock %}

{% block main %}
<div class="main-content login-wrap account-settings container-fluid">
  <div class="row">
    <div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 col-xs-12">
      {% include "accounts/settings-tabs.html" with password_change="selected" %}
      <div class="card">
        <form method="post" action="">
            {% csrf_token %}
            {% for field in form %}
            <div class="row">
              <div class="col-xs-12">
                  <div class="fieldWrapper">
                    <label for="{{ field.id_for_label }}">
                      {% comment %}
                      We change the "Current password" label here
                      instead of in the underlying form because the
                      view and form are managed by
                      django-registration.
                      {% endcomment %}
                      {% if field.label == 'Old password' %}
                        Current password
                      {% else %}
                        {{ field.label }}
                      {% endif %}
                    </label>
                    {{ field|add_class:"form-control" }}
                    {% if field.help_text %}
                    <p class="help">{{ field.help_text|safe }}</p>
                    {% endif %}
                    <div class="error-field"> {{ field.errors }} </div>
                </div>
              </div>
            </div>
            {% endfor %}
            <div class="row">
              <div class="col-xs-12">
                <div class="account-actions">
                  <button type="submit" class="btn btn-primary">{% trans 'Change password' %}</button>
                </div>
              </div>
            </div>
        </form>
      </div>
    </div>
  </div>
</div>
{% endblock %}


{# This is used by django.contrib.auth #}
