From 6fa0f06f5df017be3e067302407374df8f7a05b5 Mon Sep 17 00:00:00 2001
From: Chris Hill-Scott
Date: Wed, 16 Oct 2019 16:34:18 +0100
Subject: [PATCH] Enable autosizing for some textboxes
This commit makes textboxes auto-resize any time they might be used to
enter long passages of text which would otherwise make them scroll
internally.
---
.../organisations/organisation/settings/edit-go-live-notes.html | 2 +-
app/templates/views/platform-admin/returned-letters.html | 2 +-
.../views/service-settings/branding/email-options.html | 1 +
app/templates/views/support/ask-question-give-feedback.html | 2 +-
app/templates/views/support/report-problem.html | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/templates/views/organisations/organisation/settings/edit-go-live-notes.html b/app/templates/views/organisations/organisation/settings/edit-go-live-notes.html
index e53e6db0e..bcada9ab6 100644
--- a/app/templates/views/organisations/organisation/settings/edit-go-live-notes.html
+++ b/app/templates/views/organisations/organisation/settings/edit-go-live-notes.html
@@ -21,7 +21,7 @@
belonging to this organisation requests to go live.
{% call form_wrapper() %}
- {{ textbox(form.request_to_go_live_notes, width='1-1', rows=3) }}
+ {{ textbox(form.request_to_go_live_notes, width='1-1', rows=3, autosize=True) }}
{{ page_footer('Save') }}
{% endcall %}
diff --git a/app/templates/views/platform-admin/returned-letters.html b/app/templates/views/platform-admin/returned-letters.html
index 63de0e1f8..666afbc97 100644
--- a/app/templates/views/platform-admin/returned-letters.html
+++ b/app/templates/views/platform-admin/returned-letters.html
@@ -13,7 +13,7 @@
Submit returned letters
{% call form_wrapper() %}
- {{ textbox(form.references, width='1-1', rows=8) }}
+ {{ textbox(form.references, width='1-1', rows=8, autosize=True) }}
{{ page_footer("Submit") }}
{% endcall %}
diff --git a/app/templates/views/service-settings/branding/email-options.html b/app/templates/views/service-settings/branding/email-options.html
index aca111b87..2fd7563f4 100644
--- a/app/templates/views/service-settings/branding/email-options.html
+++ b/app/templates/views/service-settings/branding/email-options.html
@@ -45,6 +45,7 @@
form.something_else,
hint='Include links to your brand guidelines or examples of how to use your branding',
width='1-1',
+ autosize=True,
) }}
{% endcall %}
{% endif %}
diff --git a/app/templates/views/support/ask-question-give-feedback.html b/app/templates/views/support/ask-question-give-feedback.html
index 747f72c28..8aa8f92dc 100644
--- a/app/templates/views/support/ask-question-give-feedback.html
+++ b/app/templates/views/support/ask-question-give-feedback.html
@@ -17,7 +17,7 @@
{% call form_wrapper() %}
- {{ textbox(form.feedback, width='1-1', hint='', rows=10) }}
+ {{ textbox(form.feedback, width='1-1', hint='', rows=10, autosize=True) }}
{% if not current_user.is_authenticated %}
Do you want a reply?
Leave your details below if you’d like a response.
diff --git a/app/templates/views/support/report-problem.html b/app/templates/views/support/report-problem.html
index 002811a30..12f40e2c1 100644
--- a/app/templates/views/support/report-problem.html
+++ b/app/templates/views/support/report-problem.html
@@ -24,7 +24,7 @@
{% call form_wrapper() %}
- {{ textbox(form.feedback, width='1-1', hint='', rows=10) }}
+ {{ textbox(form.feedback, width='1-1', hint='', rows=10, autosize=True) }}
{% if not current_user.is_authenticated %}
{{ textbox(form.name, width='1-1') }}
{{ textbox(form.email_address, width='1-1') }}