{% load tz %}{% comment %} Step 5 — review, and the button that sends (HANDOFF §3, Broadcasts). One sentence that says what is about to happen, then the button that does it, labelled with the consequence: "Send broadcast" when it goes now, "Schedule broadcast" when the Schedule step picked a time. Every compliance gate is enforced by apps/broadcasts/services.py::schedule_broadcast when this posts, so a check that fails between here and the click is refused with its reason, on this step, rather than sent. {% endcomment %}
{% csrf_token %}

Review and {% if broadcast.scheduled_at %}schedule{% else %}send{% endif %}

{% if summary_preview %} {{ broadcast.name }} goes to {{ summary_preview.eligible }} {{ summary_preview.eligible|pluralize:"person,people" }} on {{ broadcast.channel_connection.display_name }} {% if broadcast.scheduled_at %}on {{ broadcast.scheduled_at|timezone:request.workspace.effective_timezone|date:"l j F \a\t H:i" }}{% else %}as soon as you send it{% endif %}. {% if summary_preview.skipped_total %}{{ summary_preview.skipped_total }} more match the audience but will be left out.{% endif %} {% else %} Choose who it goes to before sending. {% endif %}

{% comment %} Repeated from the audience step on purpose: this is the step with the button on it, and "most of your audience is out of the window" is the one thing an operator must not read for the first time afterwards. {% endcomment %} {% if composer.window_notice %}

{{ composer.window_notice }}

{% endif %} {% comment %} The same counts the audience step previewed, recomputed now — minutes can separate the two, and the number someone agrees to should be today's. {% endcomment %} {% if summary_preview %}
{{ summary_preview.eligible }}will receive it
{{ summary_preview.skipped_total }}left out
{% endif %}

{% if broadcast.scheduled_at %}It can be cancelled up to the moment it starts, and while it is sending.{% else %}It starts going out straight away. You can cancel it while it is sending.{% endif %}

{% if not ready %}
Finish the steps marked in the summary before sending.
{% endif %}
{% include "broadcasts/_step_back.html" %}