feat(options): progress bar block as one column below the logo hr (Prompt N)

In the Top-of-page tab the four progress-bar keys (position + 3 colors)
render as a single col-md-4 column directly under the logo <hr>, with an
empty col-md-8 next to it; inside the column the options stack as col-12.
config.xml: progressbarposition choice order swapped to in|under so
'In header' is listed first (default value unchanged: under).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-24 23:23:59 +01:00
commit c182259b7c
2 changed files with 18 additions and 2 deletions

View file

@ -152,7 +152,9 @@
<checkboxcolor type="colorpicker" category="Questions" width="6" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
<!-- Progress -->
<progressbarposition type="buttons" category="Progress" width="6" title="Position of the progress bar" options="under|in" optionlabels="Under header|In header">under</progressbarposition>
<!-- Prompt N: listing order swapped — "In header" FIRST, then "Under header".
The stored value semantics are unchanged (in|under); the default stays "under". -->
<progressbarposition type="buttons" category="Progress" width="6" title="Position of the progress bar" options="in|under" optionlabels="In header|Under header">under</progressbarposition>
<!-- Header sticky per screen size (shown in the "Top of the page" tab).
Breakpoints are Bootstrap's default ones: phone < md (768px),

View file

@ -159,6 +159,10 @@
] %}
{% set aLogoPositions = ['brand', 'center', 'right'] %}
{# Prompt N: the progress-bar keys render as ONE column (col-md-4; the col-md-8
next to it stays empty) directly below the logo hr, in this fixed order. #}
{% set aProgressKeys = ['progressbarposition', 'progressbarbackgroundcolor', 'progressbarcolor', 'progressbarfontcolor'] %}
{# Tab list: FIRST the "Fonts" tab (where the default/base font is chosen and the
per-element font overrides live), then the "Top of the page" tab (keys =
aTopOfPageKeys), then one tab per remaining category from config.xml like the
@ -292,12 +296,21 @@
<div class="row action_hide_on_inherit"><div class="col-12"><hr class="logo-columns-hr"></div></div>
</div>
{% elseif key not in aLogoKeys %}
{# Prompt N: in the Top-of-page tab the progress keys form ONE column below
the logo hr — open a row + col-md-4 at the first progress key and close
it (with an empty col-md-8) at the last; inside the column the wrapper
is plain col-12 so the options stack vertically. #}
{% set bProgressKey = (tab.id == 'top-of-page' and key in aProgressKeys) %}
{% if bProgressKey and key == 'progressbarposition' %}
<div class="row action_hide_on_inherit progress-block"><div class="col-md-4">
{% endif %}
{% if bProgressKey %}{% set wrapClass = 'col-12' %}{% else %}{% set wrapClass = 'col-12 col-md-' ~ attr.width|default(2) %}{% endif %}
{# server-side current value for this option (checked/selected/value) #}
{% set currentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[key] is defined ? aCurrentOptions[key] : (oParentOptions[key] is defined ? oParentOptions[key] : '')) %}
{# parent != '': this field is only visible when the parent option is "on"
(options.js toggles .option-visibility via data-show-if-parent);
the field itself is additionally disabled via data-parent/selector_radio_childfield #}
<div class="col-12 col-md-{{ attr.width|default(2) }} {% if attr.parent != '' %}option-visibility{% endif %}"
<div class="{{ wrapClass }} {% if attr.parent != '' %}option-visibility{% endif %}"
{% if attr.parent != '' %}data-show-if-parent="{{ attr.parent }}" data-show-if-value="on"{% endif %}>
<div class="mb-3">
{# label ALWAYS above the control, for every type incl. checkbox (Prompt G) #}
@ -428,6 +441,7 @@
{% endif %}
</div>
</div>
{% if bProgressKey and key == 'progressbarfontcolor' %}</div><div class="col-md-8"></div></div>{% endif %}
{% endif %}
{% endif %}
{% endfor %}