mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 12:28:24 -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">
|
<div class="bottom-gutter">
|
||||||
{% call banner_wrapper(type='dangerous') %}
|
{% call banner_wrapper(type='dangerous') %}
|
||||||
<h1 class='banner-title'>
|
<h1 class='banner-title'>
|
||||||
Too many recipients
|
{% if original_file_name %}
|
||||||
|
Too many recipients
|
||||||
|
{% else %}
|
||||||
|
Daily limit reached
|
||||||
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
You can only send {{ current_service.message_limit }} messages per day
|
You can only send {{ current_service.message_limit }} messages per day
|
||||||
@@ -10,29 +14,31 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
{% if original_file_name %}
|
||||||
{% if current_service.message_limit != remaining_messages %}
|
<p>
|
||||||
You can still send {{ remaining_messages }} messages today, but
|
{% if current_service.message_limit != remaining_messages %}
|
||||||
{% endif %}
|
You can still send {{ remaining_messages }} messages today, but
|
||||||
‘{{ original_file_name }}’ contains
|
{% endif %}
|
||||||
{{ count_of_recipients }}
|
‘{{ original_file_name }}’ contains
|
||||||
{% if count_of_recipients == 1 -%}
|
{{ count_of_recipients }}
|
||||||
{%- if template.template_type == 'email' -%}
|
{% if count_of_recipients == 1 -%}
|
||||||
email address
|
{%- if template.template_type == 'email' -%}
|
||||||
{%- elif template.template_type == 'sms' -%}
|
email address
|
||||||
phone number
|
{%- elif template.template_type == 'sms' -%}
|
||||||
{%- elif template.template_type == 'letter' -%}
|
phone number
|
||||||
address
|
{%- elif template.template_type == 'letter' -%}
|
||||||
{%- endif -%}
|
address
|
||||||
{%- else -%}
|
{%- endif -%}
|
||||||
{%- if template.template_type == 'email' -%}
|
{%- else -%}
|
||||||
email addresses
|
{%- if template.template_type == 'email' -%}
|
||||||
{%- elif template.template_type == 'sms' -%}
|
email addresses
|
||||||
phone numbers
|
{%- elif template.template_type == 'sms' -%}
|
||||||
{%- elif template.template_type == 'letter' -%}
|
phone numbers
|
||||||
addresses
|
{%- elif template.template_type == 'letter' -%}
|
||||||
{%- endif -%}
|
addresses
|
||||||
{%- endif -%}.
|
{%- endif -%}
|
||||||
</p>
|
{%- endif -%}.
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -120,25 +120,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% elif not recipients.allowed_to_send_to %}
|
{% elif not recipients.allowed_to_send_to %}
|
||||||
|
{% include "partials/check/not-allowed-to-send-to.html" %}
|
||||||
<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>
|
|
||||||
|
|
||||||
{% elif recipients.more_rows_than_can_send %}
|
{% elif recipients.more_rows_than_can_send %}
|
||||||
{% include "partials/check/too-many-messages.html" %}
|
{% include "partials/check/too-many-messages.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
Reference in New Issue
Block a user