{% extends "admin/base_site.html" %}
{% load i18n admin_static %}
{% block extrastyle %}{{ block.super }}{% endblock %}
{% block  navbar-fixed %} navbar-fixed{% endblock %}
{% block breadcrumbs %}
    <nav class="{{ request.ADMIN_COLOR_THEME }}">
        <div class="nav-wrapper">
            <div class="col s12">
                <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
                &rsaquo; {% trans 'Password change' %}
            </div>
        </div>
    </nav>
{% endblock %}
{% block content_title %}<h1>{{ title }}</h1>{% endblock %}
{% block content %}
        <div id="content-main">
        <h4>{{ title }}</h4>
            <form method="post">{% csrf_token %}
                <div>
                    {% if form.errors %}
                        <p class="errornote">
                            {% if form.errors.items|length == 1 %}
                                {% trans "Please correct the error below." %}{% else %}
                                {% trans "Please correct the errors below." %}{% endif %}
                        </p>
                    {% endif %}
                    <b class="{{ request.ADMIN_COLOR_THEME }}-text">{% 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." %}</b>
                    <div class="module">
                        <div class="input-field col l12">
                            {{ form.old_password.errors }}
                            {{ form.old_password }}{{ form.old_password.label_tag }}
                        </div>
                        <div class="input-field col l12">
                            {{ form.new_password1.errors }}
                            {{ form.new_password1 }} {{ form.new_password1.label_tag }}
                            {% if form.new_password1.help_text %}
                                <small class="help-block">{{ form.new_password1.help_text|safe }}</small>
                            {% endif %}
                        </div>

                        <div class="input-field col l12">
                            {{ form.new_password2.errors }}
                            {{ form.new_password2 }}{{ form.new_password2.label_tag }}
                            {% if form.new_password2.help_text %}
                                <small class="help-block">{{ form.new_password2.help_text|safe }}</small>
                            {% endif %}
                        </div>

                    </div>

                    <div class="input-field col l12">
                        <button type="submit" value="{% trans 'Change my password' %}"
                                class="default btn {{ request.ADMIN_COLOR_THEME }} waves-effect waves-light">{% trans 'Change my password' %}</button>
                    </div>
                </div>
            </form>
        </div>
{% endblock %}
