{% macro digitalmarketplaceOptionSelect(params) %} {%- from 'govuk_frontend_jinja/components/checkboxes/macro.html' import govukCheckboxes -%} {%- from 'govuk_frontend_jinja/components/radios/macro.html' import govukRadios -%} {% if params.filter_type == 'hidden' %} {% for item in params['items'] %} {% if item.checked %} {% endif %} {% endfor %} {% else %} {% set titleId = "option-select-title-" + params.name %} {% set closedOnLoad = True if params.closedOnLoad %}

{{ params.title }}

5 }} js-options-container" id="{{ params.optionsContainerId }}" tabindex="-1">
{% if params.filter_type == 'radios' %} {% set name = params['items'][0]['name'] %} {{ govukRadios({ "idPrefix": name, "name": name, "classes": "govuk-radios--small", "fieldset": { "legend": { "html": params.title, "classes": "govuk-visually-hidden" } }, "items": params['items'] }) }} {% else %} {% if params['items']|length > 5 %}
{% endif %} {{ govukCheckboxes({ "idPrefix": params.name, "name": params.name, "classes": "govuk-checkboxes--small", "fieldset": { "legend": { "html": params.title, "classes": "govuk-visually-hidden" } }, "items": params['items'] }) }} {% endif %}
{% endif %} {% endmacro %}