{% extends "outreach/admin/base.html" %} {% load i18n %} {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} compose{% endblock %} {% block scripts %}{{ form.media }}{% endblock %} {% block pretitle %}

{% blocktrans with current=1 total=2 %}Step {{ current }} of {{ total }}{% endblocktrans %}

{% endblock %} {% block page_title %}{% trans "Write a message" %}{% endblock %} {% block page_subtitle %}

{% trans "Every message ends with an unsubscribe link." %}

{% endblock %} {% block content %} {% with received_count=plan.recipients|length skipped_count=plan.skipped|length %}
{% csrf_token %} {% include "outreach/admin/includes/mail_hidden_fields.html" %}
{% if form.non_field_errors or form.subject.errors or form.body.errors %} {% endif %} {% if email_templates or perms.outreach.view_emailtemplate %}
{% endif %} {% if template_applied and selected_template %}
{% blocktrans with name=selected_template.name %}Using the template {{ name }}. Your previous text was replaced.{% endblocktrans %}
{% endif %}
{{ form.subject.label_tag }} {{ form.subject }}
{{ form.body.label }}
{{ form.body }}
{% blocktrans with example="{{ first_name | there }}" %}Variables are replaced for each recipient. Add a fallback after a pipe, for example {{ example }} sends “there” when the name is empty.{% endblocktrans %} {% trans "Need help?" %}
{% trans "Cancel" %}
{% if can_save_template %}

{% trans "Save this message as a template" %}

{% for error in save_template_form.name.errors %}{% endfor %} {% if can_overwrite_template %} {% endif %} {% trans "You need permission to add templates. Replacing needs permission to change them." %}
{% endif %}

{% trans "Recipients" %}

{{ received_count }}{% trans "will receive this message" %}

{% blocktrans with selected=received_count|add:skipped_count %}{{ selected }} selected, {{ skipped_count }} skipped{% endblocktrans %}

{% if max_recipients %}

{% blocktrans with maximum=max_recipients %}At most {{ maximum }} messages are sent at once.{% endblocktrans %}

{% endif %} {% if plan.skipped %} {% endif %}
{% endwith %} {% endblock %}