fix(options): move the upload facility into column 2 of the Page background tab

The "Upload an image" widget (with its scope-dependent help text) now renders
inside column 2, under the background image options, instead of full-width at
the bottom of the tab. Column 2 carries option-visibility on the
backgroundimage switch, so the upload only appears when the background image
is on. The full-width hr at the bottom of the pane is removed; the in-column
hr in column 1 stays.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-26 21:03:32 +01:00
commit 8fad17f56d

View file

@ -810,22 +810,13 @@
{% endif %}
{% endfor %}
{% if tab.category == 'Images' %}
{# row 149: close the open Page background column; after col 2 append the empty col 3 #}
{% if fLastSlot == 'bg1' or fLastSlot == 'bg2' %}</div>{% endif %}
{% if fLastSlot == 'bg2' %}<div class="col-md-4 images-col-3"></div>{% endif %}
{% endif %}
{% if tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
{# close an open slot container at the end of a Fonts/Top-of-page pane
(every non-logo, non-rest slot has exactly two open divs: row + col) #}
{% if (tab.category == 'Fonts' or tab.id == 'top-of-page') and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %}</div></div>{% endif %}
</div>
{% if tab.category == 'Images' %}
{# row 149: full-width horizontal line, then the upload facility full width
with the same scope-dependent help text as in the Top of the page tab #}
<div class="row action_hide_on_inherit"><div class="col-12"><hr class="images-upload-hr"></div></div>
{# Upload an image; the actual upload form (#upload_frontend) is rendered by themeOptions/update.php #}
<div class="row action_hide_on_inherit upload-file-row">
{# 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.
The actual upload form (#upload_frontend) is rendered by themeOptions/update.php #}
{% if fLastSlot == 'bg2' %}
<div class="col-12 upload-file-row">
<div class="ls-space margin bottom-15 top-15">
<div class="row ls-space margin bottom-15">
<div class="col-12 mb-1">
@ -850,8 +841,8 @@
</div>
</div>
</div>
{# row 149: same translatable, scope-dependent help text as under the
upload widget in the Top of the page tab (rows 140/141) #}
{# same translatable, scope-dependent help text as under the upload
widget in the Top of the page tab (rows 140/141) #}
<div class="row">
<div class="col-12">
<div class="form-text mt-1">{% if bInherit %}{{ gT("Upload here the files for logos and background. You are in the settings for your specific survey now, so files that you upload here are available for this survey only. If you want a file to be available for all surveys, upload it at the global theme settings options page.") }}{% else %}{{ gT("Upload here the files for logos and background. You are in global settings now, so files that you upload here are available for all surveys. If you want a file to be available only for your specific survey, upload it at the theme settings options page for that specific survey.") }}{% endif %}</div>
@ -859,7 +850,19 @@
</div>
</div>
</div>
</div><div class="col-md-4 images-col-3"></div>
{% elseif fLastSlot == 'bg1' %}</div>
{% endif %}
{% endif %}
{% if tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
{# close an open slot container at the end of a Fonts/Top-of-page pane
(every non-logo, non-rest slot has exactly two open divs: row + col) #}
{% if (tab.category == 'Fonts' or tab.id == 'top-of-page') and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %}</div></div>{% endif %}
</div>
{# row 150: the upload facility is NOT full-width at the bottom any more — it
lives INSIDE column 2 of the Page background pane (see the end-of-loop
closure above), so it shows/hides together with the image options #}
{# Footer at the bottom of every tab: "Proudly developed by [Respondage logo]",
linking to https://www.respondage.nl #}