Add ‘no templates’ message for broadcast services

This shouldn’t talk about emails, text messages or letters.
This commit is contained in:
Chris Hill-Scott
2020-07-14 14:52:52 +01:00
parent 41624295c9
commit 008e4befb4
2 changed files with 36 additions and 7 deletions

View File

@@ -24,14 +24,19 @@
<p class="govuk-body">
{% if current_user.has_permissions('manage_templates') %}
You need a template before you can send
You need a template before you can
{% else %}
You need to ask your service manager to add templates before you can send
You need to ask your service manager to add templates before you can
{% endif %}
{% if 'letter' in current_service.permissions %}
emails, text messages or letters
{%- else -%}
emails or text messages
{% if current_service.has_permission('broadcast') %}
prepare a broadcast
{%- else %}
send
{% if 'letter' in current_service.permissions %}
emails, text messages or letters
{%- else -%}
emails or text messages
{%- endif %}
{%- endif %}.
</p>