diff --git a/app/main/forms.py b/app/main/forms.py index 0d65972f6..5d86858f6 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1180,19 +1180,19 @@ class ConfirmPasswordForm(StripWhitespaceForm): class BaseTemplateForm(StripWhitespaceForm): - name = StringField( - u'Template name', + name = GovukTextInputField( + "Template name", validators=[DataRequired(message="Cannot be empty")]) template_content = TextAreaField( - u'Message', + "Message", validators=[ DataRequired(message="Cannot be empty"), NoCommasInPlaceHolders() ] ) process_type = RadioField( - 'Use priority queue?', + "Use priority queue?", choices=[ ('priority', 'Yes'), ('normal', 'No'), diff --git a/app/templates/views/edit-broadcast-template.html b/app/templates/views/edit-broadcast-template.html index 5b97e9a6f..af53d07c7 100644 --- a/app/templates/views/edit-broadcast-template.html +++ b/app/templates/views/edit-broadcast-template.html @@ -18,7 +18,10 @@ {% call form_wrapper() %}
- {{ textbox(form.name, width='1-1', hint='Your recipients will not see this') }} + {{ form.name(param_extensions={ + "classes": "govuk-!-width-full", + "hint": {"text": "Your recipients will not see this"}, + }) }}
{{ textbox(form.template_content, highlight_placeholders=True, width='1-1', rows=5) }} diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index 43f6a3a34..1f2c569d1 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -19,7 +19,10 @@ {% call form_wrapper() %}
- {{ textbox(form.name, width='1-1', hint='Your recipients will not see this', rows=10) }} + {{ form.name(param_extensions={ + "classes": "govuk-!-width-full", + "hint": {"text": "Your recipients will not see this"} + }) }} {{ textbox(form.subject, width='1-1', highlight_placeholders=True, rows=2) }} {{ textbox(form.template_content, highlight_placeholders=True, width='1-1', rows=8) }} {% if current_user.platform_admin %} diff --git a/app/templates/views/edit-letter-template.html b/app/templates/views/edit-letter-template.html index 21be4725a..5e05d9c01 100644 --- a/app/templates/views/edit-letter-template.html +++ b/app/templates/views/edit-letter-template.html @@ -19,7 +19,10 @@ {% call form_wrapper() %}
- {{ textbox(form.name, width='1-1', hint='Your recipients will not see this', rows=10) }} + {{ form.name(param_extensions={ + "classes": "govuk-!-width-full", + "hint": {"text": "Your recipients will not see this"} + }) }} {{ textbox(form.subject, width='1-1', highlight_placeholders=True, rows=2) }} {{ textbox(form.template_content, highlight_placeholders=True, width='1-1', rows=8) }} {{ sticky_page_footer( diff --git a/app/templates/views/edit-sms-template.html b/app/templates/views/edit-sms-template.html index 017d9b949..faf3d25d5 100644 --- a/app/templates/views/edit-sms-template.html +++ b/app/templates/views/edit-sms-template.html @@ -19,7 +19,10 @@ {% call form_wrapper() %}
- {{ textbox(form.name, width='1-1', hint='Your recipients will not see this') }} + {{ form.name(param_extensions={ + "classes": "govuk-!-width-full", + "hint": {"text": "Your recipients will not see this"} + }) }}
{{ textbox(form.template_content, highlight_placeholders=True, width='1-1', rows=5) }}