mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-02 20:59:39 -04:00
Make it clear which template you’re sending
The one downside of skipping the template page is that you no longer get such strong confirmation that you’ve picked the correct template. You still see the preview of the template, but it’s further down the page, and the name of the template has disappeared. This commit adds the name of the template to the page title, to: - have some continuity from the previous page - make it easier to double-check you’ve chosen the correct template
This commit is contained in:
@@ -451,7 +451,8 @@ def send_test_step(service_id, template_id, step_index):
|
||||
page_title=get_send_test_page_title(
|
||||
template.template_type,
|
||||
get_help_argument(),
|
||||
entering_recipient=not session['recipient']
|
||||
entering_recipient=not session['recipient'],
|
||||
name=template.name,
|
||||
),
|
||||
template=template,
|
||||
form=form,
|
||||
@@ -751,13 +752,13 @@ def all_placeholders_in_session(placeholders):
|
||||
)
|
||||
|
||||
|
||||
def get_send_test_page_title(template_type, help_argument, entering_recipient):
|
||||
def get_send_test_page_title(template_type, help_argument, entering_recipient, name=None):
|
||||
if help_argument:
|
||||
return 'Example text message'
|
||||
if template_type == 'letter':
|
||||
return 'Print a test letter'
|
||||
if entering_recipient:
|
||||
return 'Who should this message be sent to?'
|
||||
return 'Send ‘{}’'.format(name)
|
||||
return 'Personalise this message'
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ "Error" if error else "Preview of {}".format(template.name) }}
|
||||
{{ "Error" if error else "Preview of ‘{}’".format(template.name) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<h1 class="heading-large">
|
||||
Preview of {{ template.name }}
|
||||
Preview of ‘{{ template.name }}’
|
||||
</h1>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user