Decided not to use the template and include the USWDS alert one-by-one

This commit is contained in:
Jonathan Bobel
2023-10-06 11:31:28 -04:00
parent fd196c6534
commit af2da54ffc
5 changed files with 226 additions and 199 deletions

View File

@@ -1,7 +1,9 @@
<h1 class='banner-title'>
Message too long
</h1>
<p class="usa-body">
Text messages cannot be longer than {{ SMS_CHAR_COUNT_LIMIT }} characters.
Your message is {{ template.content_count }} characters.
</p>
<div class="usa-alert usa-alert--error" role="alert">
<div class="usa-alert__body">
<h1 class="usa-alert__heading">Message too long</h1>
<p class="usa-alert__text">
Text messages cannot be longer than {{ SMS_CHAR_COUNT_LIMIT }} characters.
Your message is {{ template.content_count }} characters.
</p>
</div>
</div>

View File

@@ -1,12 +1,16 @@
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: bad recipients" data-error-label="{{ upload_id }}">
You cannot send to
{{ 'this' if count_of_recipients == 1 else 'these' }}
{{ template_type_label }}
{%- if count_of_recipients != 1 -%}
{{ 'es' if 'email address' == template_type_label else 's' }}
{%- endif %}
</h1>
<p class="usa-body">
In <a class="usa-link" href="{{ url_for('.trial_mode_new') }}">trial mode</a> you can only
send to yourself and members of your team
</p>
<div class="usa-alert usa-alert--error" role="alert">
<div class="usa-alert__body">
<h1 class="usa-alert__heading">
You cannot send to
{{ 'this' if count_of_recipients == 1 else 'these' }}
{{ template_type_label }}
{%- if count_of_recipients != 1 -%}
{{ 'es' if 'email address' == template_type_label else 's' }}
{%- endif %}
</h1>
<p class="usa-alert__text">
In <a class="usa-link" href="{{ url_for('.trial_mode_new') }}">trial mode</a> you can only
send to yourself and members of your team
</p>
</div>
</div>

View File

@@ -1,6 +1,8 @@
<h1 class='banner-title' data-module="track-error" data-error-type="File previously sent" data-error-label="{{ upload_id }}">
These messages have already been sent today
</h1>
<p class="usa-body">
If you need to resend them, rename the file and upload it again.
</p>
<div class="usa-alert usa-alert--error" role="alert">
<div class="usa-alert__body">
<h1 class="usa-alert__heading">These messages have already been sent today</h1>
<p class="usa-alert__text">
If you need to resend them, rename the file and upload it again.
</p>
</div>
</div>

View File

@@ -1,23 +1,30 @@
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: too many recipients" data-error-label="{{ upload_id }}">
{% if original_file_name %}
Too many recipients
{% else %}
Daily limit reached
{% endif %}
</h1>
<p class="usa-body">
You can only send {{ current_service.message_limit|format_thousands }} messages per day
{%- if current_service.trial_mode %}
in <a class="usa-link" href="{{ url_for('.trial_mode_new')}}">trial mode</a>
{%- endif -%}
.
</p>
{% if original_file_name %}
<p class="usa-body">
{% if current_service.message_limit != remaining_messages %}
<div class="usa-alert usa-alert--error" role="alert">
<div class="usa-alert__body">
<h1 class="usa-alert__heading">
{% if original_file_name %}
Too many recipients
{% else %}
Daily limit reached
{% endif %}
</h1>
<p class="usa-alert__text">
You can only send {{ current_service.message_limit|format_thousands }} messages per day
{%- if current_service.trial_mode %}
in <a class="usa-link" href="{{ url_for('.trial_mode_new')}}">trial mode</a>
{%- endif -%}
.
</p>
{% if original_file_name %}
<p class="usa-alert__text">
{% if current_service.message_limit != remaining_messages %}
You can still send {{ remaining_messages|format_thousands }} messages today, but
{% endif %}
{{ original_file_name }} contains
{{ count_of_recipients|recipient_count(template.template_type) }}.
</p>
{% endif %}
{{ original_file_name }} contains
{{ count_of_recipients|recipient_count(template.template_type) }}.
</p>
{% endif %}
</div>
</div>