From 2d3715da4ca3f9a85f9cc35a6dc91e92f9a2a832 Mon Sep 17 00:00:00 2001 From: Tammo ter Hark Date: Tue, 24 Nov 2026 22:32:57 +0100 Subject: [PATCH] fix(options): option label always above the control, incl. checkboxes (Prompt G) The generic form-label is now rendered for every option type; the checkbox branch no longer emits an inline form-check-label (only the form-check wrapper around the input remains). Classes/id/name/for and data-parent wiring are unchanged, so options.js keeps working. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- options/options.twig | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/options/options.twig b/options/options.twig index 54f0db2..0dee1d6 100644 --- a/options/options.twig +++ b/options/options.twig @@ -214,9 +214,8 @@
- {% if attr.type != 'checkbox' %} - - {% endif %} + {# label ALWAYS above the control, for every type incl. checkbox (Prompt G) #} + {% if attr.type == 'buttons' %} {# buttons type: one radio per value of options="a|b", labels from optionlabels="A|B" #} @@ -238,9 +237,10 @@
{% elseif attr.type == 'checkbox' %} - {# checkbox: checked = "on", unchecked = "off". The label is inline - (form-check-label), so the generic label above is skipped for this - type. With survey-level inherit, an untouched box keeps the value + {# checkbox: checked = "on", unchecked = "off". The label is rendered + above like every other type (generic form-label at the top of this + block, Prompt G); only the box itself is wrapped in .form-check. + With survey-level inherit, an untouched box keeps the value "inherit" (options.js: data was-inherit). Children of a parent switch get selector_radio_childfield + data-parent like the rest. #}
@@ -250,7 +250,6 @@ {% if attr.parent != '' %}data-parent="{{ attr.parent }}"{% endif %} data-inheritvalue="{{ oParentOptions[key] }}" id="simple_edit_options_{{ key }}" name="{{ key }}"> -
{% elseif attr.type == 'dropdown' %}