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,9 +810,49 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if tab.category == 'Images' %} {% if tab.category == 'Images' %}
{# row 149: close the open Page background column; after col 2 append the empty col 3 #} {# row 149/150: close the open Page background column; after col 2 append
{% if fLastSlot == 'bg1' or fLastSlot == 'bg2' %}</div>{% endif %} the empty col 3. Row 150: INSIDE col 2, under the image options, the
{% if fLastSlot == 'bg2' %}<div class="col-md-4 images-col-3"></div>{% endif %} 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">
<label class="form-label" for="upload_image_frontend">{{ sprintf(gT("Upload an image (maximum size: %d MB):"), templateConfiguration.maxFileSize / 1024 / 1024) }}</label>
</div>
<div class="col-12">
<span id="fileselector_frontend">
<label class="btn btn-outline-secondary" for="upload_image_frontend" role="button" tabindex="0">
<input class="d-none" id="upload_image_frontend" name="upload_image_frontend" type="file">
<i class="ri-upload-fill ls-space margin right-10"></i>
{{ gT("Upload") }}
</label>
</span>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="progress">
<div id="upload_progress_frontend" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
<span class="visually-hidden">0%</span>
</div>
</div>
</div>
</div>
{# 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>
</div>
</div>
</div>
</div>
</div><div class="col-md-4 images-col-3"></div>
{% elseif fLastSlot == 'bg1' %}</div>
{% endif %}
{% endif %} {% endif %}
{% if tab.category == 'Questions' and qLastCol > 0 %}</div>{% 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 {# close an open slot container at the end of a Fonts/Top-of-page pane
@ -820,46 +860,9 @@
{% if (tab.category == 'Fonts' or tab.id == 'top-of-page') and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %}</div></div>{% endif %} {% if (tab.category == 'Fonts' or tab.id == 'top-of-page') and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %}</div></div>{% endif %}
</div> </div>
{% if tab.category == 'Images' %} {# row 150: the upload facility is NOT full-width at the bottom any more — it
{# row 149: full-width horizontal line, then the upload facility full width lives INSIDE column 2 of the Page background pane (see the end-of-loop
with the same scope-dependent help text as in the Top of the page tab #} closure above), so it shows/hides together with the image options #}
<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">
<div class="ls-space margin bottom-15 top-15">
<div class="row ls-space margin bottom-15">
<div class="col-12 mb-1">
<label class="form-label" for="upload_image_frontend">{{ sprintf(gT("Upload an image (maximum size: %d MB):"), templateConfiguration.maxFileSize / 1024 / 1024) }}</label>
</div>
<div class="col-12">
<span id="fileselector_frontend">
<label class="btn btn-outline-secondary" for="upload_image_frontend" role="button" tabindex="0">
<input class="d-none" id="upload_image_frontend" name="upload_image_frontend" type="file">
<i class="ri-upload-fill ls-space margin right-10"></i>
{{ gT("Upload") }}
</label>
</span>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="progress">
<div id="upload_progress_frontend" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
<span class="visually-hidden">0%</span>
</div>
</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) #}
<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>
</div>
</div>
</div>
</div>
{% endif %}
{# Footer at the bottom of every tab: "Proudly developed by [Respondage logo]", {# Footer at the bottom of every tab: "Proudly developed by [Respondage logo]",
linking to https://www.respondage.nl #} linking to https://www.respondage.nl #}