diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html
index 6c9139346e..ea07cf7e72 100644
--- a/app/templates/views/edit-email-template.html
+++ b/app/templates/views/edit-email-template.html
@@ -23,25 +23,28 @@
back_link_aria_label=_('Back to template {}').format(template.name) if template else _('Back')
)
}}
- {% call form_wrapper() %}
+ {% call form_wrapper(
+ show_validation_summary=True,
+ form=form,
+ field_order=['name', 'subject', 'template_content', 'template_category_id']
+ ) %}
{{ task_shortcut(
- description=_("You can put double brackets around a variable to insert custom content."),
- link_url=gca_url_for('personalisation_guide'),
- link_text=_("Guide: Send messages with custom content"),
- icon="arrow-up-right-from-square"
- )
- }}
+ description=_("You can put double brackets around a variable to insert custom content."),
+ link_url=gca_url_for('personalisation_guide'),
+ link_text=_("Guide: Send messages with custom content"),
+ icon="arrow-up-right-from-square"
+ )}}
{{ task_shortcut(
- description=_("You can insert formatting such as bolds and bullets."),
- link_url=gca_url_for('formatting_guide'),
- link_text=_("Guide: Insert email formatting"),
- icon="arrow-up-right-from-square"
- )
+ description=_("You can insert formatting such as bolds and bullets."),
+ link_url=gca_url_for('formatting_guide'),
+ link_text=_("Guide: Insert email formatting"),
+ icon="arrow-up-right-from-square"
+ )
}}
@@ -51,14 +54,20 @@
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Use a name that helps you find the template when you need it.'), rows=10, testid="template-name") }}
{{ textbox(form.subject, width='w-full', highlight_tags=True, rows=2, hint=_("Tell recipients what the email is about. Try to use less than 10 words.", testid="template-subject")) }}
-
+
{{ template_content(form.template_content, form.text_direction_rtl) }}
-
+
{{ _('Template category') }}
{% call template_category(form.template_category_id, true if template_category_mode == 'expand' else false) %}
- {{ select(form.template_category_id, hint=_('Template categories help improve delivery of your messages'), option_hints=template_category_hints, option_conditionals=other_category, testid="template-categories", use_aria_labelledby=false) }}
+ {{ select(
+ form.template_category_id,
+ hint=_('Template categories help improve delivery of your messages'),
+ option_hints=template_category_hints, option_conditionals=other_category,
+ testid="template-categories",
+ use_aria_labelledby=false
+ ) }}
{% endcall %}
-
+
{% if current_user.platform_admin %}
{{ radios(form.process_type, hint=_('This is only manageable by platform admins'), use_aria_labelledby=false) }}
{% endif %}
diff --git a/app/templates/views/edit-sms-template.html b/app/templates/views/edit-sms-template.html
index 1c92aed70f..98e492bb6c 100644
--- a/app/templates/views/edit-sms-template.html
+++ b/app/templates/views/edit-sms-template.html
@@ -18,20 +18,22 @@
back_link=url_for('main.view_template', service_id=current_service.id, template_id=template.id) if template else url_for('main.create_template', service_id=current_service.id, template_folder_id=template_folder_id),
back_link_aria_label=_('Back to template {}').format(template.name) if template else _('Back')
) }}
-
- {% call form_wrapper() %}
+
+ {% call form_wrapper(
+ show_validation_summary=True,
+ form=form,
+ field_order=['name', 'template_content', 'template_category_id']
+ ) %}
{{ task_shortcut(
- description=_("You can put double brackets around a variable to insert custom content."),
- link_url=gca_url_for('personalisation_guide'),
- link_text=_("Guide: Send messages with custom content"),
- icon="arrow-up-right-from-square"
- )
- }}
+ description=_("You can put double brackets around a variable to insert custom content."),
+ link_url=gca_url_for('personalisation_guide'),
+ link_text=_("Guide: Send messages with custom content"),
+ icon="arrow-up-right-from-square"
+ ) }}
-
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Use a name that helps you find the template when you need it.'), testid="template-name") }}
@@ -51,4 +53,5 @@
{{ _('Template category') }}
{% endcall %}
+
{% endblock %}