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

{% block content %}
<div id="content-main">
  <h1>{% trans 'Temporary password' %}</h1>

  <p>{% blocktrans %}The temporary password(s) have been set. Now securely
  inform the user(s) about their new password.{% endblocktrans %}</p>
  <p>{% blocktrans %}The user(s) will be required to change their password on
  first usage.{% endblocktrans %}</p>

  <ul>
  {% for u, password in passwords %}
    <li>
    {% if u.get_full_name %}
      <p>{% trans 'User' %}: {{ u.get_full_name }}</p>
    {% endif %}
    <p>{% trans 'Username' %}: {{ u.username }}</p>
    <p>{% trans 'Email' %}: {{ u.email|default:"-" }}</p>
    <p>{% trans 'Temporary password' %}: <code>{{ password }}</code></p>

    {% trans 'Your temporary password' as email %}
    <p><a href="mailto:{{ u.email }}?body={{ password|urlencode }}&subject={{ email }}">
       {% trans 'Compose email' %}
    </a></p>
    </li>
  {% endfor %}
  </ul>

  <form action="{{ changelist_url }}">
    <button>{% trans 'Continue' %}</button>
  </form>
</div>
{% endblock %}
