{% extends 'dashboard/layout.html' %} {% load i18n %} {% block title %} {{ commtype.name }} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block dashboard_content %}

{{ commtype.name }}

{% if preview %} {% endif %}
{% csrf_token %} {% include 'partials/form_field.html' with field=form.name %}

{% trans "Email content" %}

{% trans "These fields are rendered using Django's template system." %}

{% trans "You can use the following variables:" %}

{% templatetag openvariable %} user.get_full_name {% templatetag closevariable %}
{% trans "The full name of the user (if they have one)" %}
{% templatetag openvariable %} user.email {% templatetag closevariable %}
{% trans "The user's email address" %}
{% templatetag openvariable %} site.name {% templatetag closevariable %}
{% trans "The name of the site (eg example.com)" %}
{% if commtype.is_order_related %}
{% templatetag openvariable %} order.number {% templatetag closevariable %}
{% trans "Order number" %}
{% endif %}
{% include 'partials/form_field.html' with field=form.email_subject_template %} {% include 'partials/form_field.html' with field=form.email_body_template %} {% include 'partials/form_field.html' with field=form.email_body_html_template %}

Preview

{% if commtype.is_order_related %}

{% trans "View a preview of this email using order:" %}

{% include 'partials/form_field.html' with field=form.preview_order_number %} {% endif %}

{% trans "or send a preview to:" %}

{% include 'partials/form_field.html' with field=form.preview_email %}
{% trans "Subject" %} {{ preview.subject }}
{% trans "Body text" %}
{{ preview.body }}
{% trans "Body HTML" %} {{ preview.html }}
{% trans "or" %} {% trans "cancel" %}.
{% endblock dashboard_content %}