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

{% block breadcrumbs %}
<div class="breadcrumbs">
  <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> ›
  <a href="{% url 'admin:password_change' %}">{% trans 'Password change' %}</a> ›
  {% trans 'Temporary password' %}
</div>
{% endblock %}

{% block content %}
<div id="content-main">
  <h1>{{ title }}</h1>

  <div class="messagelist">
    <div class="success">
      {% blocktrans with username=username %}A new temporary password has been created for {{ username }}.{% endblocktrans %}
    </div>
  </div>

  <div class="module aligned wide">
    <h2>{% trans 'Temporary password details' %}</h2>
    <p class="help">
      {% trans 'Copy the password below and store it securely. It expires at the time shown.' %}
    </p>
    {% if allow_change %}
      <p class="help">
        {% trans 'You may use this temporary password as your old password when changing it.' %}
      </p>
    {% endif %}
    <div class="form-row">
      <label>{% trans 'Username' %}</label>
      <div class="readonly">{{ username }}</div>
    </div>
    <div class="form-row">
      <label>{% trans 'Temporary password' %}</label>
      <div class="readonly"><code>{{ password }}</code></div>
    </div>
    <div class="form-row">
      <label>{% trans 'Expires at' %}</label>
      <div class="readonly">{{ expires_at|date:"DATETIME_FORMAT" }}</div>
    </div>
  </div>

  <div class="submit-row">
    <a class="button" href="{{ return_url }}">{% trans 'Return to password change' %}</a>
  </div>
</div>
{% endblock %}
