diff --git a/app/templates/forms/fields/checkboxes/template.njk b/app/templates/forms/fields/checkboxes/template.njk index ddd83e88c..f16afb376 100644 --- a/app/templates/forms/fields/checkboxes/template.njk +++ b/app/templates/forms/fields/checkboxes/template.njk @@ -6,6 +6,7 @@ {#- Copied from https://github.com/alphagov/govuk-frontend/blob/v2.13.0/src/components/checkboxes/template.njk Changes: + - `formGroup` option to control whether or not the checkboxes are wrapped with a `govuk-form-group` class - `classes` option added to `item` allow custom classes on the `.govuk-checkboxes__item` element - `classes` option added to `item.hint` allow custom classes on the `.govuk-hint` element (added to GOVUK Frontend in v3.5.0 - remove when we update) - `asList` option added the root `params` object to allow setting of the `.govuk-checkboxes` and `.govuk-checkboxes__item` element types @@ -14,6 +15,12 @@ instead. We need this for error messages and hints as well -#} {% set idPrefix = params.idPrefix if params.idPrefix else params.name %} +{% if 'formGroup' not in params %} + {% set formGroup = True %} +{% else %} + {% set formGroup = params.formGroup %} +{% endif %} + {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} {% set describedBy = params.describedBy if params.describedBy else "" %} @@ -120,7 +127,7 @@ {% endset -%} -
+
{% if params.fieldset %} {% call govukFieldset({ describedBy: describedBy, diff --git a/app/templates/views/templates/_template_list.html b/app/templates/views/templates/_template_list.html index f17fcfb07..0b30b18a1 100644 --- a/app/templates/views/templates/_template_list.html +++ b/app/templates/views/templates/_template_list.html @@ -23,7 +23,7 @@ {% endif %}

{% else %} -