{% load i18n %}
<div style="margin-left:20px;">
    {% if data.password_change_required %}
        <p class='help'>{% trans "Your password has expired. Please change it using the form below." %}</p>
    {% else %}
        <p class='help'>Use the following form to change your password.</p>
    {% endif %}

    {% if data.form.non_field_errors %}
    <div class="alert alert-danger">
        {{ data.form.non_field_errors }}
    </div>
    {% endif %}

    <form novalidate action="" method="post" class="form-horizontal">
        {% csrf_token %}

        {% for field in data.form %}
        <div class="form-group">
            <label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>
            <div class="col-sm-10">
                {{ field }}
                <span style="color:red">{{ field.errors }}</span>
            </div>
        </div>
        {% endfor %}
        <div class="form-group">
            <div class="col-sm-12">
                <button type="submit" class="btn btn-lg btn-default pull-right">
                    <i class="fa fa-save"></i> Change password
                </button>
            </div>
        </div>
    </form>
</div>