{% load wagtailadmin_tags %}
{% if error_message %}
{% icon name="warning" %} {{ error_message }}
{% endif %} {% if sent %} {% block campaign_status %}

Status: {{ campaign.status }}

{% if report %} {% if report.send_time %}

Send time: {{ report.send_time }} ({{ report.send_time|timesince }} ago).

{% endif %}

Emails sent: {{ report.emails_sent }} ({{ report.bounces }} bounces)

Opens: {{ report.opens }}

Clicks: {{ report.clicks }}

{% endif %} {% endblock %} {% else %}

{% if has_action_permission.save_campaign %} {% endif %} {% if has_action_permission.send_test_email %} {% endif %} {% if has_action_permission.send_campaign %} {% endif %}
{% fragment as save_dialog_subtitle %} This action will save a new draft page revision and save the newsletter campaign to {{ backend_name }} with your changes. {% endfragment %} {% dialog icon_name="mail" id="wn-save-dialog" title="Save campaign" dialog_root_selector="[data-edit-form]" subtitle=save_dialog_subtitle %} {% enddialog %} {% fragment as test_dialog_subtitle %} This action will save a new draft page revision and send a test email with your changes. {% endfragment %} {% dialog icon_name="mail" id="wn-test-dialog" title="Send test email" dialog_root_selector="[data-edit-form]" subtitle=test_dialog_subtitle %}
{% include "wagtailadmin/shared/field.html" with field=test_form.email %}
{% enddialog %} {% dialog icon_name="mail" id="wn-recipients-required" title="Send campaign" dialog_root_selector="[data-edit-form]" %}
{% icon name="warning" %}

You must first select recipients for the newsletter.

{% enddialog %} {% fragment as send_dialog_subtitle %} This action will save a new draft page revision and send the campaign using {{ backend_name }} with your changes. {% endfragment %} {% dialog icon_name="mail" id="wn-send-dialog" title="Send campaign" dialog_root_selector="[data-edit-form]" subtitle=send_dialog_subtitle %}
{% icon name="warning" %}

{% enddialog %}

{% endif %} {% if campaign %}

{% icon name="link-external" classname="w-w-4 w-h-4" %} Open campaign in {{ backend_name }}

{% endif %}