Make broadcast template editor expand to fit

It’s fiddly having to scroll within a small textbox to see all the
content. Let’s make the box expand to fit the contents like we do
elsewhere. This was removed by accident when we stopped highlighting
placeholders in broadcast templates in
https://github.com/alphagov/notifications-admin/pull/3672/files
This commit is contained in:
Chris Hill-Scott
2020-12-24 14:10:37 +00:00
parent 8302b2b667
commit 810dc03628
2 changed files with 2 additions and 1 deletions

View File

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

View File

@@ -480,6 +480,7 @@ def test_broadcast_template_doesnt_highlight_placeholders(
service_id=SERVICE_ONE_ID,
template_id=fake_uuid,
)
assert page.select_one('textarea')['data-module'] == 'enhanced-textbox'
assert page.select_one('textarea')['data-highlight-placeholders'] == 'false'