{% extends "admin/base_site.html" %}
{% load i18n l10n admin_urls static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
    &rsaquo; {% trans 'Send test email' %}
</div>
{% endblock %}

{% block content %}
<h1>{% trans "Send Test Emails" %}</h1>
<div class="module">
    <h2>{% trans 'Templates to test' %}</h2>
    <ul>
    {% for template in templates %}
        <li><strong>{{ template.name }}</strong>: "{{ template.subject }}"</li>
    {% endfor %}
    </ul>
</div>
<div class="module">
    <h2>Test attributes</h2>
    <form method="post" id="test_email_form">{% csrf_token %}
        <fieldset class="module aligned">
            {% for field in form %}
            {% if field.is_hidden %}
                {{ field }}
            {% else %}
            <div class="form-row field-{{field.html_name}}">
                <div>
                    {{ field.errors }}
                    <label for="{{ field.id_for_label }}" {% if field.field.required %}class="required"{% endif %}>{{ field.label }}:</label>
                    {{ field }} {% if field.help_text %}
                    <p class="help">{{ field.help_text|safe }}</p>
                    {% endif %}
                </div>
            </div>
            {% endif %}
            {% endfor %}
        </fieldset>
        <input type="submit" value="send" />
    </form>
</div>
{% endblock %}
