{% extends "admin/base_site.html" %}
{% load i18n static bootstrapped_goodies_tags %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumb">
<li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li>{% trans 'Password change' %}</a>
</ul>
{% endblock %}

{% block title %}{% trans 'Password change' %}{% endblock %}
{% block content_title %}<a class="navbar-brand">{% trans 'Password change' %}</a>{% endblock %}

{% block content %}<div id="content-main">

<form class="form-horizontal" action="" method="post">{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger">
    {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</div>
{% endif %}

<div class="alert alert-info">{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</div>

<fieldset class="_module _aligned wide">

<div class="form-group">
    <div class="control-label col-sm-2">
        {{ form.old_password.label_tag }}
    </div>
    <div class="controls col-sm-10">
        {% dab_field_rendering form.old_password %}
        {% if form.old_password.errors %}<span class="text-danger">{{ form.old_password.errors|striptags }}</span>{% endif %}
    </div>
</div>

<div class="form-group">
    <div class="control-label col-sm-2">
        {{ form.new_password1.label_tag }}
    </div>
    <div class="controls col-sm-10">
        {% dab_field_rendering form.new_password1 %}
        {% if form.new_password1.errors %} <span class="text-danger">{{ form.new_password1.errors|striptags }}</span>{% endif %}
        {% if form.new_password1.help_text %}<span class="text-info">{{ form.new_password1.help_text }}</span>{% endif %}
    </div>
</div>

<div class="form-group">
    <div class="control-label col-sm-2">
        {{ form.new_password2.label_tag }}
    </div>
    <div class="controls col-sm-10">
        {% dab_field_rendering form.new_password2 %}
        {% if form.new_password2.errors %} <span class="text-danger">{{ form.new_password2.errors|striptags }}</span>{% endif %}
        {% if form.new_password2.help_text %}<span class="text-info">{{ form.new_password2.help_text }}</span>{% endif %}
    </div>
</div>

</fieldset>

<div class="form-actions">
    <div class="controls col-sm-offset-2 col-sm-10">
        <input type="submit" value="{% trans 'Change my password' %}" class="default btn btn-primary" />
    </div>
</div>

<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
</form></div>

{% endblock %}
