{% extends "admin/base_site.html" %}
{% load i18n admin_static admin_modify %}
{% load url from future %}
{% load admin_urls %}

{% block extrahead %}{{ block.super }}
{% url 'admin:jsi18n' as jsi18nurl %}
<script type="text/javascript" src="{{ jsi18nurl|default:"../../../../jsi18n/" }}"></script>
{% endblock %}
endblock %}
{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<ul class="breadcrumb">
	<li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> <span class="divider">/</span></li>
	<li><a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_label|capfirst|escape }}</a> <span class="divider">/</span></li>
	<li><a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> <span class="divider">/</span></li>
	<li><a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}">{{ original|truncatewords:"18" }}</a> <span class="divider">/</span></li>
	<li class="active">{% trans 'Change password' %}</li>
</ul>
{% endblock %}
{% endif %}
{% block content %}
<form action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if form.errors %}
    <p class="errornote">
    {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
{% endif %}

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

<fieldset>

<div class="form-row">
  {# TODO: get required class on label_tag #}
  <label for="id_password1" class="required">{% trans 'Password' %}:</label> {{ form.password1 }}
  {{ form.password1.errors }}
</div>

<div class="form-row">
  {# TODO: get required class on label_tag #}
  <label for="id_password2" class="required">{% trans 'Password (again)' %}:</label> {{ form.password2 }}
  <p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
  {{ form.password2.errors }}
</div>

</fieldset>

<div class="form-actions">
<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> {% trans 'Change password' %}</button>
</div>

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