mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-27 17:39:51 -04:00
add template partials for some notification checks
also move out some from the check.html page. This is going to help with sharing templates between single notifications and csv files.
This commit is contained in:
10
app/templates/partials/check/message-too-long.html
Normal file
10
app/templates/partials/check/message-too-long.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="bottom-gutter">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
<h1 class='banner-title'>
|
||||
Message too long
|
||||
</h1>
|
||||
<p>
|
||||
Text messages can’t be longer than {{ template|string|length }} characters. Your message is {{message_length}} characters.
|
||||
</p>
|
||||
{% endcall %}
|
||||
</div>
|
||||
17
app/templates/partials/check/not-allowed-to-send-to.html
Normal file
17
app/templates/partials/check/not-allowed-to-send-to.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="bottom-gutter">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
<h1 class='banner-title'>
|
||||
You can’t send to
|
||||
{{ 'this' if count_of_recipients == 1 else 'these' }}
|
||||
{{ recipients.recipient_column_headers[0] }}
|
||||
{%- if count_of_recipients != 1 -%}
|
||||
{{ 'es' if 'email address' == recipients.recipient_column_headers[0] else 's' }}
|
||||
{%- endif %}
|
||||
</h1>
|
||||
<p>
|
||||
In <a href="{{ url_for('.trial_mode') }}">trial mode</a> you can only
|
||||
send to yourself and members of your team
|
||||
</p>
|
||||
{{ skip_to_file_contents() }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
@@ -1,7 +1,11 @@
|
||||
<div class="bottom-gutter">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
<h1 class='banner-title'>
|
||||
Too many recipients
|
||||
{% if original_file_name %}
|
||||
Too many recipients
|
||||
{% else %}
|
||||
Daily limit reached
|
||||
{% endif %}
|
||||
</h1>
|
||||
<p>
|
||||
You can only send {{ current_service.message_limit }} messages per day
|
||||
@@ -10,29 +14,31 @@
|
||||
{%- endif -%}
|
||||
.
|
||||
</p>
|
||||
<p>
|
||||
{% if current_service.message_limit != remaining_messages %}
|
||||
You can still send {{ remaining_messages }} messages today, but
|
||||
{% endif %}
|
||||
‘{{ original_file_name }}’ contains
|
||||
{{ count_of_recipients }}
|
||||
{% if count_of_recipients == 1 -%}
|
||||
{%- if template.template_type == 'email' -%}
|
||||
email address
|
||||
{%- elif template.template_type == 'sms' -%}
|
||||
phone number
|
||||
{%- elif template.template_type == 'letter' -%}
|
||||
address
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{%- if template.template_type == 'email' -%}
|
||||
email addresses
|
||||
{%- elif template.template_type == 'sms' -%}
|
||||
phone numbers
|
||||
{%- elif template.template_type == 'letter' -%}
|
||||
addresses
|
||||
{%- endif -%}
|
||||
{%- endif -%}.
|
||||
</p>
|
||||
{% if original_file_name %}
|
||||
<p>
|
||||
{% if current_service.message_limit != remaining_messages %}
|
||||
You can still send {{ remaining_messages }} messages today, but
|
||||
{% endif %}
|
||||
‘{{ original_file_name }}’ contains
|
||||
{{ count_of_recipients }}
|
||||
{% if count_of_recipients == 1 -%}
|
||||
{%- if template.template_type == 'email' -%}
|
||||
email address
|
||||
{%- elif template.template_type == 'sms' -%}
|
||||
phone number
|
||||
{%- elif template.template_type == 'letter' -%}
|
||||
address
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{%- if template.template_type == 'email' -%}
|
||||
email addresses
|
||||
{%- elif template.template_type == 'sms' -%}
|
||||
phone numbers
|
||||
{%- elif template.template_type == 'letter' -%}
|
||||
addresses
|
||||
{%- endif -%}
|
||||
{%- endif -%}.
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
@@ -120,25 +120,7 @@
|
||||
</div>
|
||||
|
||||
{% elif not recipients.allowed_to_send_to %}
|
||||
|
||||
<div class="bottom-gutter">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
<h1 class='banner-title'>
|
||||
You can’t send to
|
||||
{{ 'this' if count_of_recipients == 1 else 'these' }}
|
||||
{{ recipients.recipient_column_headers[0] }}
|
||||
{%- if count_of_recipients != 1 -%}
|
||||
{{ 'es' if 'email address' == recipients.recipient_column_headers[0] else 's' }}
|
||||
{%- endif %}
|
||||
</h1>
|
||||
<p>
|
||||
In <a href="{{ url_for('.trial_mode') }}">trial mode</a> you can only
|
||||
send to yourself and members of your team
|
||||
</p>
|
||||
{{ skip_to_file_contents() }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
{% include "partials/check/not-allowed-to-send-to.html" %}
|
||||
{% elif recipients.more_rows_than_can_send %}
|
||||
{% include "partials/check/too-many-messages.html" %}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user