Update contact list content (#3464)

* Make the naming of contact lists consistent

* Update content

* Update caption

* Update content

* Update content

* Update content

* Update tests

Co-authored-by: Chris Hill-Scott <me@quis.cc>
This commit is contained in:
karlchillmaid
2020-12-31 14:03:54 +00:00
committed by GitHub
parent e7b1834ad4
commit 6d8fdb669c
3 changed files with 12 additions and 12 deletions

View File

@@ -6,13 +6,13 @@
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
{% block service_page_title %}
Choose a saved contact list
Choose an emergency contact list
{% endblock %}
{% block maincolumn_content %}
{{ page_header(
'Choose a saved contact list',
'Choose an emergency contact list',
back_link=url_for('.send_one_off', service_id=current_service.id, template_id=template.id)
) }}
@@ -20,11 +20,11 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-five-sixths">
<p class="govuk-body">
You cannot use a saved contact list with this template because it
You cannot use an emergency contact list with this template because it
is personalised with {{ list_of_placeholders(template.placeholders) }}.
</p>
<p class="govuk-body">
Saved contact lists can only store email addresses or phone
Emergency contact lists can only include email addresses or phone
numbers.
</p>
</div>
@@ -33,10 +33,10 @@
<div class='dashboard-table ajax-block-container'>
{% call(item, row_number) list_table(
contact_lists,
caption="Existing contact lists",
caption="Emergency contact lists",
caption_visible=False,
empty_message=(
'You dont have any contact lists yet'
'You have not saved any contact lists yet.'
),
field_headings=[
'File',
@@ -71,7 +71,7 @@
You have not saved any lists of {{ recipient_count_label(99, template.template_type) }} yet.
</p>
<p class="govuk-body">
To upload and save a new contact list, go to the <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.uploads', service_id=current_service.id) }}">uploads</a> page.
To upload and save an emergency contact list, go to the <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.uploads', service_id=current_service.id) }}">uploads</a> page.
</p>
</div>
</div>

View File

@@ -29,7 +29,7 @@
{% if link_to_upload %}
<a class="govuk-link govuk-link--no-visited-state govuk-!-margin-right-3" href="{{ url_for('.send_messages', service_id=current_service.id, template_id=template.id) }}">Upload a list of {{ recipient_count_label(999, template.template_type) }}</a>
{% if current_service.contact_lists %}
<a class="govuk-link govuk-link--no-visited-state govuk-!-margin-right-3" href="{{ url_for('.choose_from_contact_list', service_id=current_service.id, template_id=template.id) }}">Use a saved list</a>
<a class="govuk-link govuk-link--no-visited-state govuk-!-margin-right-3" href="{{ url_for('.choose_from_contact_list', service_id=current_service.id, template_id=template.id) }}">Use an emergency list</a>
{% endif %}
{% endif %}
{% if skip_link %}

View File

@@ -1551,7 +1551,7 @@ def test_send_one_off_has_link_to_use_existing_list(
),
),
(
'Use a saved list',
'Use an emergency list',
url_for(
'main.choose_from_contact_list',
service_id=SERVICE_ONE_ID,
@@ -4264,9 +4264,9 @@ def test_choose_from_contact_list_with_personalised_template(
assert [
normalize_spaces(p.text) for p in page.select('main p')
] == [
'You cannot use a saved contact list with this template because '
'You cannot use an emergency contact list with this template because '
'it is personalised with ((name)) and ((thing)).',
'Saved contact lists can only store email addresses or phone numbers.',
'Emergency contact lists can only include email addresses or phone numbers.',
]
assert not page.select('table')
@@ -4290,7 +4290,7 @@ def test_choose_from_contact_list_with_no_lists(
normalize_spaces(p.text) for p in page.select('main p')
] == [
'You have not saved any lists of phone numbers yet.',
'To upload and save a new contact list, go to the uploads page.',
'To upload and save an emergency contact list, go to the uploads page.',
]
assert page.select_one('main p a')['href'] == url_for(
'main.uploads',