fix(options): Page background tab in two col-md-6 columns; option wrappers full column width

Row 163/164: the Page background pane used three col-md-4 columns with an
empty third, and its option wrappers rendered col-12 col-md-<width> inside
the slot columns (bImagesPane was missing from the wrapClass condition), so
each option only used the left part of its column. Now two col-md-6 columns
under the full-width h2/p intro, wrappers plain col-12; config.xml widths
of the 6 Page background options 4 -> 6 (width = pane column width).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-27 03:40:45 +01:00
commit dc2f09e73c

View file

@ -317,9 +317,10 @@
{% set aImagesKeys = aImagesKeys|merge([key]) %}
{% endif %}
{% endfor %}
{# row 149: the Page background pane has an explicit key order (slot layout below):
col 1 = overall background color (chooser + custom) + in-column hr + background
image on/off; col 2 = the three image-detail options; col 3 stays empty #}
{# row 149/163: the Page background pane has an explicit key order (slot layout below):
TWO columns (col-md-6 each) under the full-width intro — col 1 = overall background
color (chooser + custom) + in-column hr + background image on/off; col 2 = the three
image-detail options + the upload facility #}
{% set aImagesPaneKeys = ['bodybackgroundcolor', 'bodybackgroundcolorcustom', 'backgroundimage', 'backgroundimagefile', 'backgroundimagefixed', 'backgroundimagedisplay'] %}
{% if aImagesKeys is not empty %}
{% set aTabs = aTabs|merge([{ 'id': 'category-images', 'label': 'Page background', 'category': 'Page background', 'keys': aImagesPaneKeys }]) %}
@ -517,12 +518,12 @@
{% elseif fSlot == 'ppos' %}<div class="row action_hide_on_inherit progress-block"><div class="col-md-4">
{% endif %}
{% elseif bImagesPane %}
{# row 149: Page background transitions — bg1 -> bg2 closes col 1
and opens col 2 (the whole column carries option-visibility,
so it is hidden when the background image is off); the first
bg1 key opens col 1 #}
{% if fLastSlot == 'bg1' %}</div><div class="col-md-4 border-start images-col-2 option-visibility{% if bgImgVal != 'on' %} d-none{% endif %}" data-show-if-parent="backgroundimage" data-show-if-value="on">{% endif %}
{% if fSlot == 'bg1' %}<div class="col-md-4 images-col-1">{% endif %}
{# row 149/163: Page background transitions — bg1 -> bg2 closes
col 1 and opens col 2, both col-md-6 (the whole column carries
option-visibility, so it is hidden when the background image
is off); the first bg1 key opens col 1 #}
{% if fLastSlot == 'bg1' %}</div><div class="col-md-6 border-start images-col-2 option-visibility{% if bgImgVal != 'on' %} d-none{% endif %}" data-show-if-parent="backgroundimage" data-show-if-value="on">{% endif %}
{% if fSlot == 'bg1' %}<div class="col-md-6 images-col-1">{% endif %}
{% elseif bGroupsPane %}
{# row 157: Groups transitions — g1 -> g2 closes col 1 and opens
col 2 (border-start); the first g1 key opens col 1 #}
@ -644,7 +645,13 @@
{% set qLastCol = qCol %}
{% endif %}
{% endif %}
{% if bQuestionsPane or bTopPane or bGroupsPane or (bFontsPane and fSlot != 'rest') %}{% set wrapClass = 'col-12' %}{% else %}{% set wrapClass = 'col-12 col-md-' ~ attr.width|default(2) %}{% endif %}
{# row 163: inside a slot pane (Questions columns, Header, Page
background, Groups, Fonts slots) every option wrapper is col-12
(full width of its slot column) — attr.width only applies to the
plain grid panes. Without bImagesPane here the wrappers rendered
col-12 col-md-<width> INSIDE the col-md-6 slot column, i.e. only
the left part of each column was used. #}
{% if bQuestionsPane or bTopPane or bGroupsPane or bImagesPane or (bFontsPane and fSlot != 'rest') %}{% 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's value
@ -834,10 +841,11 @@
{% endif %}
{% endfor %}
{% if tab.category == 'Page background' %}
{# row 149/150: close the open Page background column; after col 2 append
the empty col 3. Row 150: INSIDE col 2, under the image options, the
upload facility + help text — the column div carries option-visibility
on backgroundimage, so the upload only shows when the image is on.
{# row 149/150/163: close the open Page background column (two col-md-6
columns, no empty third). Row 150: INSIDE col 2, under the image
options, the upload facility + help text — the column div carries
option-visibility on backgroundimage, so the upload only shows when
the image is on.
The actual upload form (#upload_frontend) is rendered by themeOptions/update.php #}
{% if fLastSlot == 'bg2' %}
<div class="col-12 upload-file-row">
@ -874,7 +882,7 @@
</div>
</div>
</div>
</div><div class="col-md-4 images-col-3"></div>
</div>
{% elseif fLastSlot == 'bg1' %}</div>
{% endif %}
{% endif %}