Only hide channel-specific tasks if volume is 0

If you have email templates but haven’t told us what volumes you’re
sending we should assume you are going to send emails. We should only
stop asking you to add a reply-to address once you’ve told us for sure
you’re not going to send any emails.

This also applies to changing the text message sender – this should only
be hidden if you don’t have text message templates or you’ve said you’re
not going to be sending any text messages.
This commit is contained in:
Chris Hill-Scott
2019-03-05 10:30:40 +00:00
parent 531219b87e
commit 87c62e6c52
2 changed files with 64 additions and 16 deletions

View File

@@ -27,14 +27,21 @@
'Add templates with examples of the content you plan to send',
url_for('main.choose_template', service_id=current_service.id),
) }}
{% if current_service.has_email_templates %}
{% if (
current_service.has_email_templates
and (current_service.volume_email != 0)
) %}
{{ task_list_item(
current_service.has_email_reply_to_address,
'Add an email reply-to address',
url_for('main.service_email_reply_to', service_id=current_service.id),
) }}
{% endif %}
{% if current_service.has_sms_templates and current_service.shouldnt_use_govuk_as_sms_sender %}
{% if (
current_service.has_sms_templates
and current_service.shouldnt_use_govuk_as_sms_sender
and (current_service.volume_sms != 0)
) %}
{{ task_list_item(
not current_service.sms_sender_is_govuk,
'Change your text message sender name',