{% extends "outreach/admin/base.html" %} {% load i18n admin_urls admin_modify static %} {% block title %}{% if errors %}{% trans "Error:" %} {% endif %}{% if add %}{% trans "Add template" %}{% else %}{{ original.name }}{% endif %} | {{ site_name }}{% endblock %} {% block extrahead %} {% endblock %} {% block scripts %}{{ media }}{% endblock %} {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} template-form{% endblock %} {% block head %} {% url opts|admin_urlname:'changelist' as changelist_url %}
{% if change %}

{% trans "Template" %}

{% endif %}

{% if add %}{% trans "Add template" %}{% else %}{{ original.name }}{% endif %}

{% trans "Changes apply to the next message that uses this template. Messages already sent are not touched." %}

{% if has_view_permission %} {% trans "Templates" %} {% endif %}
{% endblock %} {% block content %}
{% if change and not has_change_permission %}
{% trans "Name" %}
{{ original.name }}
{% trans "Subject" %}
{{ original.subject }}
{% trans "Message" %}
{% else %}
{% csrf_token %}
{% if errors %}

{% blocktrans count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

{{ adminform.form.non_field_errors }} {% endif %} {% with form=adminform.form %}
{{ form.name.errors }} {{ form.name.label_tag }} {{ form.name }}
{{ form.subject.errors }} {{ form.subject.label_tag }} {{ form.subject }}
{{ form.body_html.errors }} {{ form.body_html.label }}
{{ form.body_html }}
{% 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?" %}
{% endwith %} {% submit_row %}
{% endif %}
{% if sample_preview_html %}
{% trans "Preview with sample values" %}
{{ sample_preview_subject }}
{% endif %}
{% endblock %}