From 70b18eefab4bf4aa89f68fa4c3fba6403f509020 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Fri, 29 Nov 2024 14:33:34 +0000 Subject: [PATCH] update other radios to always be open --- src/components/radios/_macro-options.md | 1 - src/components/radios/_macro.njk | 9 +- src/components/radios/_radio.scss | 4 +- ...mple-radios-with-clear-button-expanded.njk | 100 ------------------ .../example-radios-with-clear-button.njk | 1 + .../radios/example-radios-with-error.njk | 1 - ... example-radios-with-other-checkboxes.njk} | 16 +-- ...k => example-radios-with-other-radios.njk} | 16 +-- ...k => example-radios-with-other-select.njk} | 8 +- ... example-radios-with-other-text-input.njk} | 0 ...=> example-radios-with-other-textarea.njk} | 18 ++-- ...xample-radios-with-revealed-checkboxes.njk | 69 ------------ ...e-radios-with-revealed-radios-expanded.njk | 69 ------------ ...e-radios-with-revealed-select-expanded.njk | 72 ------------- ...example-radios-with-revealed-text-area.njk | 88 --------------- ...dios-with-revealed-text-input-expanded.njk | 83 --------------- ...example-radios-with-visible-text-input.njk | 42 -------- 17 files changed, 32 insertions(+), 565 deletions(-) delete mode 100644 src/components/radios/example-radios-with-clear-button-expanded.njk rename src/components/radios/{example-radios-with-revealed-checkboxes-expanded.njk => example-radios-with-other-checkboxes.njk} (76%) rename src/components/radios/{example-radios-with-revealed-radios.njk => example-radios-with-other-radios.njk} (77%) rename src/components/radios/{example-radios-with-revealed-select.njk => example-radios-with-other-select.njk} (89%) rename src/components/radios/{example-radios-with-revealed-text-input.njk => example-radios-with-other-text-input.njk} (100%) rename src/components/radios/{example-radios-with-revealed-text-area-expanded.njk => example-radios-with-other-textarea.njk} (80%) delete mode 100644 src/components/radios/example-radios-with-revealed-checkboxes.njk delete mode 100644 src/components/radios/example-radios-with-revealed-radios-expanded.njk delete mode 100644 src/components/radios/example-radios-with-revealed-select-expanded.njk delete mode 100644 src/components/radios/example-radios-with-revealed-text-area.njk delete mode 100644 src/components/radios/example-radios-with-revealed-text-input-expanded.njk delete mode 100644 src/components/radios/example-radios-with-visible-text-input.njk diff --git a/src/components/radios/_macro-options.md b/src/components/radios/_macro-options.md index 2e10e2f8d8..4512f08a7a 100644 --- a/src/components/radios/_macro-options.md +++ b/src/components/radios/_macro-options.md @@ -40,7 +40,6 @@ | type | string | false | Sets the HTML `type` attribute for the nested ``. Can be set to either: “number”, “email”, “tel”, “password”, or “search”. Defaults to “text”. | | inputClasses | string | false | Classes to apply to the radio input element | | otherType | string | false (unless alternative input used) | Set the type of nested input if not using default text input, using available types: “select”, “checkboxes”, “radios” or “textarea”. | -| open | boolean | false | Set to “true” to show the nested `other` input when page loads | | selectAllChildren | boolean | false | Set to “true” when using `otherType` set to “checkboxes” to show all nested checkboxes pre-selected | | attributes | object | false | HTML attributes (for example, data attributes) to add to the nested input | diff --git a/src/components/radios/_macro.njk b/src/components/radios/_macro.njk index a8f4a199f4..4dc9f3a5b5 100644 --- a/src/components/radios/_macro.njk +++ b/src/components/radios/_macro.njk @@ -34,10 +34,6 @@ value="{{ radio.value }}" name="{{ params.name }}" {% if radio.checked or (params.value is defined and params.value == radio.value) %}{{ ' ' }}checked{% endif %} - {% if radio.other and not radio.other.open %} - {{ ' ' }}aria-controls="{{ radio.id }}-other-wrap" - aria-haspopup="true" - {% endif %} {% if radio.attributes %}{% for attribute, value in (radio.attributes.items() if radio.attributes is mapping and radio.attributes.items else radio.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %} /> {{ @@ -52,10 +48,7 @@ }} {% if radio.other %} {% set otherType = radio.other.otherType | default('input') %} - + {% if otherType == "input" %} {% from "components/input/_macro.njk" import onsInput %} {{ diff --git a/src/components/radios/_radio.scss b/src/components/radios/_radio.scss index 4f966907bb..5316ad9efd 100644 --- a/src/components/radios/_radio.scss +++ b/src/components/radios/_radio.scss @@ -58,9 +58,7 @@ &__other { @extend .ons-checkbox__other; - } - &__input:not(:checked) ~ &__other--open { - display: block; + display: block !important; } } diff --git a/src/components/radios/example-radios-with-clear-button-expanded.njk b/src/components/radios/example-radios-with-clear-button-expanded.njk deleted file mode 100644 index 35ae572851..0000000000 --- a/src/components/radios/example-radios-with-clear-button-expanded.njk +++ /dev/null @@ -1,100 +0,0 @@ -{% from "components/radios/_macro.njk" import onsRadios %} -{% from "components/button/_macro.njk" import onsButton %} -{% from "components/question/_macro.njk" import onsQuestion %} -{% from "components/panel/_macro.njk" import onsPanel %} - -{% - call onsQuestion({ - "title": "What is your religion?", - "legendIsQuestionTitle": true - }) -%} - {{ - onsPanel({ - "body": '

This question is voluntary

', - "classes": 'ons-u-mb-l' - }) - }} -
- {{ - onsRadios({ - "dontWrap": true, - "name": "religion", - "clearRadios": { - "text": "Clear selection", - "name": "clear-radios", - "ariaClearText": "You can clear your answer using the clear selection button after the radio inputs", - "ariaClearedText": "You have cleared your answer" - }, - "radios": [ - { - "id": "none-radio-with-clear-button-expanded", - "label": { - "text": "No religion" - }, - "value": "none" - }, - { - "id": "christian-radio-with-clear-button-expanded", - "label": { - "text": "Christian", - "description": "Including Church of England, Catholic, Protestant and all other Christian denominations" - }, - "value": "christian" - }, - { - "id": "buddhist-radio-with-clear-button-expanded", - "label": { - "text": "Buddhist" - }, - "value": "buddhist" - }, - { - "id": "hindu-radio-with-clear-button-expanded", - "label": { - "text": "Hindu" - }, - "value": "hindu" - }, - { - "id": "jewish", - "label": { - "text": "Jewish" - }, - "value": "jewish" - }, - { - "id": "muslim-radio-with-clear-button-expanded", - "label": { - "text": "Muslim" - }, - "value": "muslim" - }, - { - "id": "sikh-radio-with-clear-button-expanded", - "label": { - "text": "Sikh" - }, - "value": "sikh" - }, - { - "id": "other-radio-with-clear-button-expanded", - "label": { - "text": "Any other religion" - }, - "value": "other", - "checked": true, - "other": { - "otherType": "input", - "id": "other-textbox-radio-with-clear-button-expanded", - "name": "other-answer", - "label": { - "text": "Enter your religion" - } - } - } - ] - }) - }} -
-{% endcall %} diff --git a/src/components/radios/example-radios-with-clear-button.njk b/src/components/radios/example-radios-with-clear-button.njk index e6c832776a..18abce02cc 100644 --- a/src/components/radios/example-radios-with-clear-button.njk +++ b/src/components/radios/example-radios-with-clear-button.njk @@ -83,6 +83,7 @@ "text": "Any other religion" }, "value": "other", + "checked": true, "other": { "otherType": "input", "id": "other-textbox-radio-with-clear-button", diff --git a/src/components/radios/example-radios-with-error.njk b/src/components/radios/example-radios-with-error.njk index c80231197f..b2b20d0b8a 100644 --- a/src/components/radios/example-radios-with-error.njk +++ b/src/components/radios/example-radios-with-error.njk @@ -20,7 +20,6 @@ "value": "no", "checked": true, "other": { - "open": true, "otherType": "input", "id": "no-textbox-example-radio-with-error", "name": "no-answer", diff --git a/src/components/radios/example-radios-with-revealed-checkboxes-expanded.njk b/src/components/radios/example-radios-with-other-checkboxes.njk similarity index 76% rename from src/components/radios/example-radios-with-revealed-checkboxes-expanded.njk rename to src/components/radios/example-radios-with-other-checkboxes.njk index 9e4e9e6a34..cc91f63275 100644 --- a/src/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +++ b/src/components/radios/example-radios-with-other-checkboxes.njk @@ -7,21 +7,21 @@ "borderless": true, "radios": [ { - "id": "post-example-radio-with-revealed-checkbox-expanded", + "id": "post-example-radio-with-other-checkbox-expanded", "label": { "text": "By post" }, "value": "post" }, { - "id": "email-example-radio-with-revealed-checkbox-expanded", + "id": "email-example-radio-with-other-checkbox-expanded", "label": { "text": "By email" }, "value": "email" }, { - "id": "phone-example-radio-with-revealed-checkbox-expanded", + "id": "phone-example-radio-with-other-checkbox-expanded", "label": { "text": "By phone" }, @@ -30,34 +30,34 @@ "other": { "otherType": "checkboxes", "selectAllChildren": true, - "id": "phone-time-example-radio-with-revealed-checkbox-expanded", + "id": "phone-time-example-radio-with-other-checkbox-expanded", "name": "phone-time", "legend": "Select preferred times of day", "checkboxes": [ { "value": "anytime", - "id": "anytime-example-radio-with-revealed-checkbox-expanded", + "id": "anytime-example-radio-with-other-checkbox-expanded", "label": { "text": "Anytime of day" } }, { "value": "morning", - "id": "morning-example-radio-with-revealed-checkbox-expanded", + "id": "morning-example-radio-with-other-checkbox-expanded", "label": { "text": "Morning" } }, { "value": "afternoon", - "id": "afternoon-example-radio-with-revealed-checkbox-expanded", + "id": "afternoon-example-radio-with-other-checkbox-expanded", "label": { "text": "Afternoon" } }, { "value": "evening", - "id": "evening-example-radio-with-revealed-checkbox-expanded", + "id": "evening-example-radio-with-other-checkbox-expanded", "label": { "text": "Evening" } diff --git a/src/components/radios/example-radios-with-revealed-radios.njk b/src/components/radios/example-radios-with-other-radios.njk similarity index 77% rename from src/components/radios/example-radios-with-revealed-radios.njk rename to src/components/radios/example-radios-with-other-radios.njk index fdc2fb490b..61350b3dee 100644 --- a/src/components/radios/example-radios-with-revealed-radios.njk +++ b/src/components/radios/example-radios-with-other-radios.njk @@ -7,55 +7,55 @@ "borderless": true, "radios": [ { - "id": "post-example-with-revealed-radio", + "id": "post-example-with-other-radio", "label": { "text": "By post" }, "value": "post" }, { - "id": "email-example-with-revealed-radio", + "id": "email-example-with-other-radio", "label": { "text": "By email" }, "value": "email" }, { - "id": "phone-example-with-revealed-radio", + "id": "phone-example-with-other-radio", "label": { "text": "By phone" }, "value": "phone", "other": { "otherType": "radios", - "id": "phone-time-example-with-revealed-radio", + "id": "phone-time-example-with-other-radio", "name": "phone-time", "legend": "Choose preferred time of day", "radios": [ { "value": "anytime", - "id": "anytime-example-with-revealed-radio", + "id": "anytime-example-with-other-radio", "label": { "text": "Anytime of day" } }, { "value": "morning", - "id": "morning-example-with-revealed-radio", + "id": "morning-example-with-other-radio", "label": { "text": "Morning" } }, { "value": "afternoon", - "id": "afternoon-example-with-revealed-radio", + "id": "afternoon-example-with-other-radio", "label": { "text": "Afternoon" } }, { "value": "evening", - "id": "evening-example-with-revealed-radio", + "id": "evening-example-with-other-radio", "label": { "text": "Evening" } diff --git a/src/components/radios/example-radios-with-revealed-select.njk b/src/components/radios/example-radios-with-other-select.njk similarity index 89% rename from src/components/radios/example-radios-with-revealed-select.njk rename to src/components/radios/example-radios-with-other-select.njk index c823a1765e..b47fe7eeea 100644 --- a/src/components/radios/example-radios-with-revealed-select.njk +++ b/src/components/radios/example-radios-with-other-select.njk @@ -13,28 +13,28 @@ "name": "contact", "radios": [ { - "id": "post-example-with-revealed-select", + "id": "post-example-with-other-select", "label": { "text": "By post" }, "value": "post" }, { - "id": "email-example-with-revealed-select", + "id": "email-example-with-other-select", "label": { "text": "By email" }, "value": "email" }, { - "id": "phone-example-with-revealed-select", + "id": "phone-example-with-other-select", "label": { "text": "By phone" }, "value": "phone", "other": { "otherType": "select", - "id": "phone-time-example-with-revealed-select", + "id": "phone-time-example-with-other-select", "name": "phone-time", "label": { "text": "Choose preferred time of day" diff --git a/src/components/radios/example-radios-with-revealed-text-input.njk b/src/components/radios/example-radios-with-other-text-input.njk similarity index 100% rename from src/components/radios/example-radios-with-revealed-text-input.njk rename to src/components/radios/example-radios-with-other-text-input.njk diff --git a/src/components/radios/example-radios-with-revealed-text-area-expanded.njk b/src/components/radios/example-radios-with-other-textarea.njk similarity index 80% rename from src/components/radios/example-radios-with-revealed-text-area-expanded.njk rename to src/components/radios/example-radios-with-other-textarea.njk index ed5e3e21ed..446740fe68 100644 --- a/src/components/radios/example-radios-with-revealed-text-area-expanded.njk +++ b/src/components/radios/example-radios-with-other-textarea.njk @@ -14,56 +14,56 @@ "name": "travel", "radios": [ { - "id": "home-example-radio-with-revealed-text-input", + "id": "home-example-radio-with-other-text-input", "label": { "text": "Work mainly from home" }, "value": "home" }, { - "id": "car-example-radio-with-revealed-text-input", + "id": "car-example-radio-with-other-text-input", "label": { "text": "Car or van" }, "value": "car" }, { - "id": "underground-example-radio-with-revealed-text-input", + "id": "underground-example-radio-with-other-text-input", "label": { "text": "Underground, metro, light rail or tram" }, "value": "underground" }, { - "id": "train-example-radio-with-revealed-text-input", + "id": "train-example-radio-with-other-text-input", "label": { "text": "Train" }, "value": "train" }, { - "id": "bus-example-radio-with-revealed-text-input", + "id": "bus-example-radio-with-other-text-input", "label": { "text": "Bus, minibus or coach" }, "value": "bus" }, { - "id": "bicycle-example-radio-with-revealed-text-input", + "id": "bicycle-example-radio-with-other-text-input", "label": { "text": "Bicycle" }, "value": "bicycle" }, { - "id": "walk-example-radio-with-revealed-text-input", + "id": "walk-example-radio-with-other-text-input", "label": { "text": "Walk" }, "value": "walk" }, { - "id": "other-radio-example-radio-with-revealed-text-input", + "id": "other-radio-example-radio-with-other-text-input", "label": { "text": "Other" }, @@ -71,7 +71,7 @@ "checked": true, "other": { "otherType": "textarea", - "id": "other-textbox-example-radio-with-revealed-text-input", + "id": "other-textbox-example-radio-with-other-text-input", "name": "other-answer", "label": { "text": "Enter how you travel" diff --git a/src/components/radios/example-radios-with-revealed-checkboxes.njk b/src/components/radios/example-radios-with-revealed-checkboxes.njk deleted file mode 100644 index d399b6853a..0000000000 --- a/src/components/radios/example-radios-with-revealed-checkboxes.njk +++ /dev/null @@ -1,69 +0,0 @@ -{% from "components/radios/_macro.njk" import onsRadios %} - -{{ - onsRadios({ - "legend": "How would you like us to contact you?", - "name": "contact", - "borderless": true, - "radios": [ - { - "id": "post-example-radio-with-revealed-checkbox", - "label": { - "text": "By post" - }, - "value": "post" - }, - { - "id": "email-example-radio-with-revealed-checkbox", - "label": { - "text": "By email" - }, - "value": "email" - }, - { - "id": "phone-example-radio-with-revealed-checkbox", - "label": { - "text": "By phone" - }, - "value": "phone", - "other": { - "otherType": "checkboxes", - "selectAllChildren": true, - "id": "phone-time-example-radio-with-revealed-checkbox", - "name": "phone-time", - "legend": "Select preferred times of day", - "checkboxes": [ - { - "value": "anytime", - "id": "anytime-example-radio-with-revealed-checkbox", - "label": { - "text": "Anytime of day" - } - }, - { - "value": "morning", - "id": "morning-example-radio-with-revealed-checkbox", - "label": { - "text": "Morning" - } - }, - { - "value": "afternoon", - "id": "afternoon-example-radio-with-revealed-checkbox", - "label": { - "text": "Afternoon" - } - }, - { - "value": "evening", - "id": "evening-example-radio-with-revealed-checkbox", - "label": { - "text": "Evening" - } - } - ] - } - } - ] - }) -}} diff --git a/src/components/radios/example-radios-with-revealed-radios-expanded.njk b/src/components/radios/example-radios-with-revealed-radios-expanded.njk deleted file mode 100644 index 35169e06b2..0000000000 --- a/src/components/radios/example-radios-with-revealed-radios-expanded.njk +++ /dev/null @@ -1,69 +0,0 @@ -{% from "components/radios/_macro.njk" import onsRadios %} - -{{ - onsRadios({ - "legend": "How would you like us to contact you?", - "name": "contact", - "borderless": true, - "radios": [ - { - "id": "post-example-with-revealed-radio-expanded", - "label": { - "text": "By post" - }, - "value": "post" - }, - { - "id": "email-example-with-revealed-radio-expanded", - "label": { - "text": "By email" - }, - "value": "email" - }, - { - "id": "phone-example-with-revealed-radio-expanded", - "label": { - "text": "By phone" - }, - "value": "phone", - "checked": true, - "other": { - "otherType": "radios", - "id": "phone-time-example-with-revealed-radio-expanded", - "name": "phone-time", - "legend": "Choose preferred time of day", - "radios": [ - { - "value": "anytime", - "id": "anytime-example-with-revealed-radio-expanded", - "label": { - "text": "Anytime of day" - } - }, - { - "value": "morning", - "id": "morning-example-with-revealed-radio-expanded", - "label": { - "text": "Morning" - } - }, - { - "value": "afternoon", - "id": "afternoon-example-with-revealed-radio-expanded", - "label": { - "text": "Afternoon" - } - }, - { - "value": "evening", - "id": "evening-example-with-revealed-radio-expanded", - "label": { - "text": "Evening" - } - } - ] - } - } - ] - }) -}} diff --git a/src/components/radios/example-radios-with-revealed-select-expanded.njk b/src/components/radios/example-radios-with-revealed-select-expanded.njk deleted file mode 100644 index a097265acc..0000000000 --- a/src/components/radios/example-radios-with-revealed-select-expanded.njk +++ /dev/null @@ -1,72 +0,0 @@ -{% from "components/question/_macro.njk" import onsQuestion %} -{% from "components/radios/_macro.njk" import onsRadios %} - -{% - call onsQuestion({ - "title": "How would you like us to contact you?", - "legendIsQuestionTitle": true - }) -%} - {{ - onsRadios({ - "dontWrap": true, - "name": "contact", - "radios": [ - { - "id": "post-example-with-revealed-select-expanded", - "label": { - "text": "By post" - }, - "value": "post" - }, - { - "id": "email-example-with-revealed-select-expanded", - "label": { - "text": "By email" - }, - "value": "email" - }, - { - "id": "phone-example-with-revealed-select-expanded", - "label": { - "text": "By phone" - }, - "value": "phone", - "checked": true, - "other": { - "otherType": "select", - "id": "phone-time-example-with-revealed-select-expanded", - "name": "phone-time", - "label": { - "text": "Choose preferred time of day" - }, - "options": [ - { - "value": "", - "text": "Select an option", - "disabled": true, - "selected": true - }, - { - "value": "anytime", - "text": "Any time of day" - }, - { - "value": "morning", - "text": "Morning" - }, - { - "value": "afternoon", - "text": "Afternoon" - }, - { - "value": "evening", - "text": "Evening" - } - ] - } - } - ] - }) - }} -{% endcall %} diff --git a/src/components/radios/example-radios-with-revealed-text-area.njk b/src/components/radios/example-radios-with-revealed-text-area.njk deleted file mode 100644 index 66561416c1..0000000000 --- a/src/components/radios/example-radios-with-revealed-text-area.njk +++ /dev/null @@ -1,88 +0,0 @@ -{% from "components/radios/_macro.njk" import onsRadios %} -{% from "components/question/_macro.njk" import onsQuestion %} - -{% - call onsQuestion({ - "title": "How do you usually travel to work?", - "classes": "ons-u-mt-no", - "legendIsQuestionTitle": true - }) -%} - {{ - onsRadios({ - "dontWrap": true, - "name": "travel", - "radios": [ - { - "id": "home-example-radio-with-revealed-text-input", - "label": { - "text": "Work mainly from home" - }, - "value": "home" - }, - { - "id": "car-example-radio-with-revealed-text-input", - "label": { - "text": "Car or van" - }, - "value": "car" - }, - { - "id": "underground-example-radio-with-revealed-text-input", - "label": { - "text": "Underground, metro, light rail or tram" - }, - "value": "underground" - }, - { - "id": "train-example-radio-with-revealed-text-input", - "label": { - "text": "Train" - }, - "value": "train" - }, - { - "id": "bus-example-radio-with-revealed-text-input", - "label": { - "text": "Bus, minibus or coach" - }, - "value": "bus" - }, - { - "id": "bicycle-example-radio-with-revealed-text-input", - "label": { - "text": "Bicycle" - }, - "value": "bicycle" - }, - { - "id": "walk-example-radio-with-revealed-text-input", - "label": { - "text": "Walk" - }, - "value": "walk" - }, - { - "id": "other-radio-example-radio-with-revealed-text-input", - "label": { - "text": "Other" - }, - "value": "other", - "other": { - "otherType": "textarea", - "id": "other-textbox-example-radio-with-revealed-text-input", - "name": "other-answer", - "label": { - "text": "Enter how you travel" - }, - "charCheckLimit": { - "limit": 200, - "charCountSingular": "You have {x} character remaining", - "charCountPlural": "You have {x} characters remaining" - } - } - } - ] - }) - }} -{% endcall %} diff --git a/src/components/radios/example-radios-with-revealed-text-input-expanded.njk b/src/components/radios/example-radios-with-revealed-text-input-expanded.njk deleted file mode 100644 index ea7a614d1e..0000000000 --- a/src/components/radios/example-radios-with-revealed-text-input-expanded.njk +++ /dev/null @@ -1,83 +0,0 @@ -{% from "components/radios/_macro.njk" import onsRadios %} -{% from "components/question/_macro.njk" import onsQuestion %} - -{% - call onsQuestion({ - "title": "How do you usually travel to work?", - "classes": "ons-u-mt-no", - "legendIsQuestionTitle": true - }) -%} - {{ - onsRadios({ - "dontWrap": true, - "name": "travel", - "radios": [ - { - "id": "home-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Work mainly from home" - }, - "value": "home" - }, - { - "id": "car-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Car or van" - }, - "value": "car" - }, - { - "id": "underground-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Underground, metro, light rail or tram" - }, - "value": "underground" - }, - { - "id": "train-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Train" - }, - "value": "train" - }, - { - "id": "bus-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Bus, minibus or coach" - }, - "value": "bus" - }, - { - "id": "bicycle-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Bicycle" - }, - "value": "bicycle" - }, - { - "id": "walk-example-radio-with-revealed-text-input-expanded", - "label": { - "text": "Walk" - }, - "value": "walk" - }, - { - "id": "other-radio-with-revealed-text-input-expanded", - "label": { - "text": "Other" - }, - "value": "other", - "checked": true, - "other": { - "id": "other-textbox-example-radio-with-revealed-text-input-expanded", - "name": "other-answer", - "label": { - "text": "Enter how you travel" - } - } - } - ] - }) - }} -{% endcall %} diff --git a/src/components/radios/example-radios-with-visible-text-input.njk b/src/components/radios/example-radios-with-visible-text-input.njk deleted file mode 100644 index d62590aa4c..0000000000 --- a/src/components/radios/example-radios-with-visible-text-input.njk +++ /dev/null @@ -1,42 +0,0 @@ -{% from "components/radios/_macro.njk" import onsRadios %} -{% from "components/question/_macro.njk" import onsQuestion %} - -{% - call onsQuestion({ - "title": "Is the gender you identify with the same as your sex registered at birth?", - "classes": "ons-u-mt-no", - "legendIsQuestionTitle": true - }) -%} - {{ - onsRadios({ - "dontWrap": true, - "name": "gender-identity", - "radios": [ - { - "id": "yes-example-radio-with-visible-text", - "label": { - "text": "Yes" - }, - "value": "yes" - }, - { - "id": "no-example-radio-with-visible-text", - "label": { - "text": "No" - }, - "value": "no", - "other": { - "open": true, - "otherType": "input", - "id": "no-textbox-example-radio-with-visible-text", - "name": "no-answer", - "label": { - "text": "Enter your gender identity" - } - } - } - ] - }) - }} -{% endcall %}