{% extends "admin/base_site.html" %}
{% load i18n admin_static %}
{% load admin_urls %}
{% block  navbar-fixed %} navbar-fixed{% endblock %}
{% block extrahead %}{{ block.super }}
    <script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
{% endblock %}
{% block extrastyle %}{{ block.super }}{% endblock %}
{% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
{% if not is_popup %}
    {% 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; <a
                        href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
                    &rsaquo; <a
                        href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
                    &rsaquo; <a
                        href="{% url opts|admin_urlname:'change' original.pk|admin_urlquote %}">{{ original|truncatewords:"18" }}</a>
                    &rsaquo; {% trans 'Change password' %}
                </div>
            </div>
        </nav>
    {% endblock %}
{% endif %}
{% block content %}
    <div class="card-panel">
    <div id="content-main">
        <form action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form">
            {% csrf_token %}{% block form_top %}{% endblock %}
            <div>
                {% if is_popup %}<input type="hidden" name="_popup" value="1"/>{% endif %}
                {% 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 %}

                <h5><u>{% blocktrans with username=original %}Enter a new password for the user
                    <strong>{{ username }}</strong>.{% endblocktrans %}</u></h5>

                <div class="module">

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

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

                </div>

                <div class="row">
                    <input type="submit" value="{% trans 'Change password' %}" class="default btn  {{ request.ADMIN_COLOR_THEME }} right waves-effect waves-light"/>
                </div>

                <script type="text/javascript">document.getElementById("id_password1").focus();</script>
            </div>
        </form>
    </div>
    </div>
{% endblock %}
