mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
make partials source-agnostic
they're currently expecting a RecipientsCSV object - but we won't always have that available if we're handling a single notification. So make the partials take generic variables, and then use a jinja with block to pass in the correct values from either the check csv page or the check notification page. Additionally set the notification check page to show errors nicely - hide the send button if there were problems, and replace the header
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
Message too long
|
||||
</h1>
|
||||
<p>
|
||||
Text messages can’t be longer than {{ template|string|length }} characters. Your message is {{message_length}} characters.
|
||||
Text messages can’t be longer than {{ SMS_CHAR_COUNT_LIMIT }} characters.
|
||||
Your message is {{ template.content_count }} characters.
|
||||
</p>
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% macro skip_to_file_contents() %}
|
||||
<p class="visually-hidden">
|
||||
<a href="#{{ file_contents_header_id }}">Skip to file contents</a>
|
||||
</p>
|
||||
{% endmacro %}
|
||||
|
||||
<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] }}
|
||||
{{ template_type_label }}
|
||||
{%- if count_of_recipients != 1 -%}
|
||||
{{ 'es' if 'email address' == recipients.recipient_column_headers[0] else 's' }}
|
||||
{{ 'es' if 'email address' == template_type_label else 's' }}
|
||||
{%- endif %}
|
||||
</h1>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user