Don’t highlight ((double brackets)) in broadcast templates

You can’t use them to personalise the message, so it’s confusing for
the UI to suggest they’re somehow special.
This commit is contained in:
Chris Hill-Scott
2020-10-05 17:22:06 +01:00
parent c8e85efd54
commit 207ea91acd
2 changed files with 16 additions and 1 deletions

View File

@@ -24,7 +24,7 @@
}) }}
</div>
<div class="govuk-grid-column-two-thirds">
{{ textbox(form.template_content, highlight_placeholders=True, width='1-1', rows=5) }}
{{ textbox(form.template_content, highlight_placeholders=False, width='1-1', rows=5) }}
{{ sticky_page_footer('Save') }}
</div>
</div>

View File

@@ -399,6 +399,21 @@ def test_should_show_page_for_one_template(
mock_get_service_template.assert_called_with(SERVICE_ONE_ID, template_id, None)
def test_broadcast_template_doesnt_highlight_placeholders(
client_request,
service_one,
mock_get_broadcast_template,
fake_uuid,
):
service_one['permissions'] += ['broadcast']
page = client_request.get(
'.edit_service_template',
service_id=SERVICE_ONE_ID,
template_id=fake_uuid,
)
assert page.select_one('textarea')['data-highlight-placeholders'] == 'false'
def test_caseworker_redirected_to_one_off(
client_request,
mock_get_service_templates,