From e99d3263cb12ce9b331e7c2b6c36fa2e97a446de Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Thu, 21 Jul 2016 13:48:10 +0100 Subject: [PATCH] fix issues with too many messages partial not branching correctly branch for "has service sent anything today" was around the intial paragraph, rather than around the "you can still send..." bit - they should always see the first paragraph, especially the bit that points out if they're in trial mode. They don't need to see how many messages they have remaining today if it's the same amount as their daily limit. --- .../partials/check/too_many_messages.html | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/templates/partials/check/too_many_messages.html b/app/templates/partials/check/too_many_messages.html index 66ba82f06..457c7321e 100644 --- a/app/templates/partials/check/too_many_messages.html +++ b/app/templates/partials/check/too_many_messages.html @@ -3,25 +3,24 @@

Too many recipients

- {% if statistics.emails_requested or statistics.sms_requested %} -

- You can only send {{ current_service.message_limit }} - messages per day - {%- if current_service.restricted %} - in trial mode - {%- endif -%} - . -

- {% endif %}

- You can still send - {{ current_service.message_limit - statistics.get('emails_requested', 0) - statistics.get('sms_requested', 0) }} - messages today, but + You can only send {{ current_service.message_limit }} messages per day + {%- if current_service.restricted %} + in trial mode + {%- endif -%} + . +

+

+ {% if statistics.emails_requested or statistics.sms_requested %} + You can still send + {{ current_service.message_limit - statistics.get('emails_requested', 0) - statistics.get('sms_requested', 0) }} + messages today, but + {% endif %} ‘{{ original_file_name }}’ contains {{ count_of_recipients }} {{ recipients.recipient_column_header }} {%- if count_of_recipients != 1 -%} {{ 'es' if 'email address' == recipients.recipient_column_header else 's' }} - {%- endif %} + {%- endif %}.

{% endcall %}