mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-20 13:12:27 -04:00
Improve page titles later on in the one off flow
Now that the page title for picking a sender/reply to has been improved, I think these pages are also less clear than they could be. This commit changes the page titles to (I hope) be clearer about what is needed from the user on these pages.
This commit is contained in:
@@ -421,7 +421,11 @@ def send_test_step(service_id, template_id, step_index):
|
||||
skip_link = None
|
||||
return render_template(
|
||||
'views/send-test.html',
|
||||
page_title=get_send_test_page_title(template.template_type, get_help_argument()),
|
||||
page_title=get_send_test_page_title(
|
||||
template.template_type,
|
||||
get_help_argument(),
|
||||
entering_recipient=not session['recipient']
|
||||
),
|
||||
template=template,
|
||||
form=form,
|
||||
skip_link=skip_link,
|
||||
@@ -711,12 +715,14 @@ def all_placeholders_in_session(placeholders):
|
||||
)
|
||||
|
||||
|
||||
def get_send_test_page_title(template_type, help_argument):
|
||||
def get_send_test_page_title(template_type, help_argument, entering_recipient):
|
||||
if help_argument:
|
||||
return 'Example text message'
|
||||
if template_type == 'letter':
|
||||
return 'Print a test letter'
|
||||
return 'Send to one recipient'
|
||||
if entering_recipient:
|
||||
return 'Who should this message be sent to?'
|
||||
return 'Personalise this message'
|
||||
|
||||
|
||||
def get_back_link(service_id, template_id, step_index):
|
||||
|
||||
@@ -575,13 +575,13 @@ def test_send_one_off_does_not_send_without_the_correct_permissions(
|
||||
(
|
||||
mock_get_service_template_with_placeholders,
|
||||
partial(url_for, 'main.send_test'),
|
||||
'Send to one recipient',
|
||||
'Personalise this message',
|
||||
False,
|
||||
),
|
||||
(
|
||||
mock_get_service_template_with_placeholders,
|
||||
partial(url_for, 'main.send_one_off'),
|
||||
'Send to one recipient',
|
||||
'Who should this message be sent to?',
|
||||
False,
|
||||
),
|
||||
(
|
||||
@@ -599,13 +599,13 @@ def test_send_one_off_does_not_send_without_the_correct_permissions(
|
||||
(
|
||||
mock_get_service_email_template,
|
||||
partial(url_for, 'main.send_test'),
|
||||
'Send to one recipient',
|
||||
'Personalise this message',
|
||||
False,
|
||||
),
|
||||
(
|
||||
mock_get_service_email_template,
|
||||
partial(url_for, 'main.send_one_off'),
|
||||
'Send to one recipient',
|
||||
'Who should this message be sent to?',
|
||||
False,
|
||||
),
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user