{% extends "admin/base_site.html" %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %}


{% block breadcrumb_items %}
  <li class="breadcrumb-item active" aria-current="page">
    {{ _("Password change") }}
  </li>
{% endblock breadcrumb_items %}


{% block messages %}
  {{ block.super }}

  {% for error in form.non_field_errors %}
    <li class="paper-message paper-message--error">
      {{ error }}
    </li>
  {% endfor %}
{% endblock %}


{% block content_title %}
  <h1>
    {{ _("Password change") }}
  </h1>
{% endblock %}


{% block content %}
  <form class="paper-form paper-form--hook" method="post" novalidate>
    {% csrf_token %}

    {% block form_top %}{% endblock %}

    {% if is_popup %}
      <input type="hidden" name="{{ is_popup_var }}" value="1" />
    {% endif %}

    <input type="hidden" name="username" value="{{ original.get_username }}"/>

    <fieldset class="paper-card paper-card--info card mb-3">
      <p class="card-header">
        {{ _("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.") }}
      </p>
      <div class="card-body p-0">
        {% include 'paper_admin/includes/admin_field.html' with field=form.old_password %}
        {% include 'paper_admin/includes/admin_field.html' with field=form.new_password1 %}
        {% include 'paper_admin/includes/admin_field.html' with field=form.new_password2 %}
      </div>
    </fieldset>

    <button type="submit" class="btn btn-success">
      {{ _("Change my password") }}
    </button>
  </form>
{% endblock %}
