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

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}
{% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
  <ul class="breadcrumb">
  <li class="breadcrumb-item"><a href="{% url 'admin:index' %}"><i class="feather icon-home"></i></a></li>
  <li class="breadcrumb-item"><a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a></li>
  <li class="breadcrumb-item"><a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a></li>
  <li class="breadcrumb-item"><a href="{% url opts|admin_urlname:'change' original.pk|admin_urlquote %}">{{ original|truncatewords:"18" }}</a></li>
  <li class="breadcrumb-item">{% translate 'Change password' %}</li>
  </ul>
{% endblock %}
{% endif %}
{% block content_content %}<div id="content-main">
<form{% if form_url %} action="{{ form_url }}"{% endif %} method="post" id="{{ opts.model_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
<input type="text" name="username" value="{{ original.get_username }}" class="hidden">
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
{% if form.errors %}
    <p class="errornote">
    {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %}
    </p>
{% endif %}

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

<fieldset class="module aligned">

<div class="row form-row">
  <div class="offset-md-2 col-md-10 error-container">{{ form.password1.errors }}</div>
  <div class="col-md-2 mt-2">
      {{ form.password1.label_tag }}
  </div>
  <div class="col-md-10 {% if field.is_checkbox %}mt-2{% endif %}">
      {{ form.password1 }}
  </div>
  
  {% if form.password1.help_text %}
  <div class="offset-md-2 col-md-10 help-container">{{ form.password1.help_text|safe  }}</div>
  {% endif %}
</div>

<div class="row form-row">
  <div class="offset-md-2 col-md-10 error-container">{{ form.password2.errors }}</div>
  <div class="col-md-2 mt-2">
      {{ form.password2.label_tag }}
  </div>
  <div class="col-md-10 {% if field.is_checkbox %}mt-2{% endif %}">
      {{ form.password2 }}
  </div>
  
  {% if form.password2.help_text %}
  <div class="offset-md-2 col-md-10 help-container">{{ form.password2.help_text|safe  }}</div>
  {% endif %}
</div>


</fieldset>

<div class="row justify-content-end mt-4 mx-2">
<div class="col px-0"></div>
<div class="col-sm-12 col-md-auto px-1"> <input type="submit" value="{% translate 'Change password' %}" class="form-control btn btn-primary"></div>
</div>

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