mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
big commit with letters removal
This commit is contained in:
@@ -52,16 +52,9 @@
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Missing recipient columns" data-error-label="{{ upload_id }}">
|
||||
There’s a problem with your column names
|
||||
</h1>
|
||||
{% if template.template_type == 'letter' %}
|
||||
<p class="govuk-body">
|
||||
Your file needs at least 3 address columns, for example ‘address line 1’,
|
||||
‘address line 2’ and ‘address line 3’.
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="govuk-body">
|
||||
Your file needs a column called ‘{{ first_recipient_column }}’.
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="govuk-body">
|
||||
Right now it has {{ recipients.column_headers | formatted_list(
|
||||
prefix='one column, called ',
|
||||
@@ -113,16 +106,6 @@
|
||||
{% include "partials/check/not-allowed-to-send-to.html" %}
|
||||
{% endwith %}
|
||||
|
||||
{% elif trying_to_send_letters_in_trial_mode %}
|
||||
|
||||
<div class="bottom-gutter">
|
||||
{% with
|
||||
count_of_recipients=count_of_recipients
|
||||
%}
|
||||
{% include "partials/check/trying-to-send-letters-in-trial-mode.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% elif recipients.more_rows_than_can_send %}
|
||||
|
||||
{% include "partials/check/too-many-messages.html" %}
|
||||
@@ -165,15 +148,7 @@
|
||||
{% call index_field() %}
|
||||
<span>
|
||||
{% set displayed_index = item.index + 2 %}
|
||||
{% if (
|
||||
trying_to_send_letters_in_trial_mode and
|
||||
(not errors or recipients.more_rows_than_can_send) and
|
||||
displayed_index != preview_row
|
||||
) %}
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.check_messages', service_id=current_service.id, template_id=template.id, upload_id=upload_id, row_index=displayed_index, original_file_name=original_file_name) }}">{{ displayed_index }}</a>
|
||||
{% else %}
|
||||
{{ displayed_index }}
|
||||
{% endif %}
|
||||
{{ displayed_index }}
|
||||
</span>
|
||||
{% endcall %}
|
||||
{% for column in column_headers %}
|
||||
|
||||
@@ -21,12 +21,6 @@
|
||||
|
||||
{{ page_header('Preview of {}'.format(template.name)) }}
|
||||
|
||||
{% if letter_too_long %}
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% include "partials/check/letter-too-long.html" %}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{{ govukSkipLink({
|
||||
"text": "Skip to file contents",
|
||||
"href": "#" + file_contents_header_id
|
||||
@@ -37,7 +31,7 @@
|
||||
<form method="post" enctype="multipart/form-data" action="{{url_for('main.start_job', service_id=current_service.id, upload_id=upload_id)}}" class='page-footer'>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="contact_list_id" value="{{ request.args.get('contact_list_id', '') }}" />
|
||||
{% if choose_time_form and template.template_type != 'letter' %}
|
||||
{% if choose_time_form %}
|
||||
{{ choose_time_form.scheduled_for(param_extensions={
|
||||
'formGroup': {'classes': 'bottom-gutter-2-3'},
|
||||
'attributes': {
|
||||
@@ -47,18 +41,12 @@
|
||||
}
|
||||
}) }}
|
||||
{% endif %}
|
||||
{% if (template.template_type != 'letter' or not request.args.from_test) and not letter_too_long %}
|
||||
{% set button_text %}
|
||||
Send {{ count_of_recipients|message_count(template.template_type) }}
|
||||
{% endset %}
|
||||
{{ govukButton({ "text": button_text }) }}
|
||||
{% else %}
|
||||
{{ govukButton({
|
||||
"element": "a",
|
||||
"text": "Download as a PDF",
|
||||
"href": url_for('no_cookie.check_messages_preview', service_id=current_service.id, template_id=template.id, upload_id=upload_id, filetype='pdf'),
|
||||
}) }}
|
||||
{% endif %}
|
||||
|
||||
{% set button_text %}
|
||||
Send {{ count_of_recipients|message_count(template.template_type) }}
|
||||
{% endset %}
|
||||
{{ govukButton({ "text": button_text }) }}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -74,20 +74,6 @@
|
||||
No content for this message
|
||||
{% elif item.message_too_long %}
|
||||
Message is too long
|
||||
{% elif not item.as_postal_address.has_enough_lines %}
|
||||
Address must be at least {{ letter_min_address_lines }} lines long
|
||||
{% elif item.as_postal_address.has_too_many_lines %}
|
||||
Address must be no more than {{ letter_max_address_lines }} lines long
|
||||
{% elif not item.as_postal_address.has_valid_last_line %}
|
||||
{% if item.as_postal_address.allow_international_letters %}
|
||||
Last line of the address must be a UK postcode or another country
|
||||
{% elif item.as_postal_address.international %}
|
||||
You do not have permission to send letters to other countries
|
||||
{% else %}
|
||||
Last line of the address must be a real UK postcode
|
||||
{% endif %}
|
||||
{% elif item.as_postal_address.has_invalid_characters %}
|
||||
Address lines must not start with any of the following characters: @ ( ) = [ ] ” \ / , < > ~
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user