{% extends "admin/base_site.html" %}
{% load i18n static uikit_admin %}
{% load admin_urls %}

{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<ul class="uk-breadcrumb">
    <li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
    <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
    <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
    <a href="{% url opts|admin_urlname:'change' original.pk|admin_urlquote %}">{{ original|truncatewords:"18" }}</a>
    <li><span>{% trans 'Change password' %}</span></li>
</ul>
{% endblock %}
{% endif %}
{% block content %}

<div class="uk-clearfix uk-background-muted uk-padding-remove">
	<div class="uk-container" uk-height-match>
		<div class="uk-float-left uk-padding-small uk-padding-remove-horizontal uk-flex uk-flex-middle">
			<span class="uk-text-lead">{% trans 'Password change' %}</span>
		</div>
	</div>
</div>

<div class="uk-container uk-padding-small">


<form action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
<input type="text" name="username" value="{{ original.get_username }}" style="display: none">
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}

{% if form.errors %}
<div class="uk-alert-danger" uk-alert>
    <a class="uk-alert-close" uk-close></a>
    <p>{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}</p>
</div>
{{ form.olderrors }}
{% endif %}

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

<div class="uk-panel uk-panel-header uk-panel-box uk-panel-box-secondary uk-margin-bottom">
	<div class="module aligned uk-form-horizontal">
		{% uka_form_row_stacked form.password1 form.password1.errors 'uk-form-width-large' %}
		{% uka_form_row_stacked form.password2 form.password2.errors 'uk-form-width-large' %}
	</div>
</div>

<div class="submit-row">
	<input type="submit" value="{% trans 'Change password' %}" class="uk-button uk-button-primary">
</div>

</div>
</form></div>
{% endblock %}
