2026-06-17 10:06:07 +02:00
{ #
2026-11-24 22:04:11 +01:00
Custom options page of this theme. Activated by <optionspage>custom</optionspage>
in config.xml: LimeSurvey then renders THIS file inside the "Simple options" tab
of themeOptions/update (instead of the core options_core.php partial) and
auto-registers options/options.js next to it.
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
All options are rendered GENERICALLY from config.xml via aOptionAttributes (the
same structure the core renderer uses, see TemplateManifest::getOptionAttributes()),
grouped by category. Adding an <option> to config.xml is therefore enough - it
shows up here automatically. Supported types: buttons, dropdown, fontselect,
checkbox, imagefile, colorpicker, duration, text.
(fontselect = per-element font override: same choices as the base "font"
dropdown plus "Same as base font"; see the branch below.)
2026-06-17 10:06:07 +02:00
2026-11-29 11:56:04 +01:00
Tab order: the "Default font and colors" category tab is FIRST (default font +
default colors), then the "Header" tab, then the "Page
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
background" tab, then the "Groups" tab, then the other remaining categories,
and LAST the "Other options" tab.
2026-06-17 10:06:07 +02:00
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
Row 159: the config.xml category names ARE these tab labels, so switching back
to the core options renderer (optionspage=core, which groups by category) shows
the same grouping. The tab ids of the first/last tabs ('category-fonts',
'category-images', 'category-simple-options') are kept as they were, so stored
tab preferences stay valid. Values are stored per option key, so this
regrouping does not touch stored values and needs no theme reset to take
effect.
2026-11-24 22:04:11 +01:00
options/options.js is a copy of the core assets/packages/themeoptions-core/
themeoptions-core.js (patched to also hide .action_hide_on_inherit rows when
"Inherit everything" is on, because the custom page has no category tabs).
2026-06-17 10:06:07 +02:00
#}
2026-11-24 22:04:11 +01:00
{ # PRIVACY: during survey-taking this theme must NEVER make external requests
(no calls to Google or any other font host). Therefore only the LOCAL
"font-websafe" package is registered here (its css is served from the
LimeSurvey server's own assets and only defines system-font stacks), so the
browser-font choices in the font dropdowns can be previewed. The Google-hosted
core packages (font-roboto, font-noto, ...) are deliberately NOT registered,
and the bundled fonts (files/fonts/*.woff2) are self-hosted via css/fonts.css.
options/options.js enforces the same rule for packages_to_load: only
"websafe" may be added there. variants/export_public.sh aborts the public
release if any other external host is referenced anywhere in the theme. #}
2026-06-17 10:06:07 +02:00
{{ registerPackage ( 'font-websafe' ) }}
2026-11-24 22:04:11 +01:00
{ # CACHE-BUST options.js: core registers it as optionsPath ~ '/options.js' WITHOUT a
version query (LSETwigViewRenderer::renderOptionPage), so browsers may serve a
heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control).
Re-register it with a version token: bump OPTIONS_JS_TOKEN below whenever
options/options.js changes, so every browser fetches the new file once. #}
feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers
(+custom children), both default mode 'default' (Default font color);
resolved via cmm.cm() in custom_header.twig (legacy hex passthrough)
- border radii show only for questionborder=box (per-key show-values in
options.twig aShowIfValuesByKey); options.js cascades hiding to nested
conditional wrappers (questionbordercolorcustom); radii stay two
subcolumns (border-start on TR/BR)
- chooser columns aligned with the font color: title section = one column
(title-0: font, font color, size/options, legacy picker, title bg, body
bg), answers-0 += checkbox chooser, help-0 = font + font color + bg
chooser, help-1 = text position
- all font-color labels follow 'Font color for ...' / 'Custom font color
for ...' (21 labels renamed, incl. 'Font color for question titles' and
'Font color for answers and subquestions')
- chooser key lists synced in options.twig/options.js/build.php (+2)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:30:39 +01:00
{% set O P T I O N S _JS_TOKEN = '20261129.5' %}
2026-11-24 22:04:11 +01:00
{{ unregisterScriptFile ( optionsPath ~ '/options.js' ) }}
{{ registerScriptFile ( optionsPath ~ '/options.js?v=' ~ O P T I O N S _JS_TOKEN , 'POS_END' ) }}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{ # FONT DROPDOWNS, fixed inline (rendered into the page HTML, so it always runs on
a fresh page load — even if the browser serves a heuristically cached
options.js; options/options.js has the same logic as a fallback, running twice
is idempotent). Core prepends the "Local server" optgroups server-side
(TemplateManifest::getOptionAttributes), so the order can only be fixed
client-side. Three things are done for every font select (.selector_fontselect):
1. EMPTY optgroups are removed (e.g. "Custom (this theme)" when the theme
ships no own font) — an empty category is not shown.
2. Optgroups are ordered Custom (this theme) > Bundled open source fonts >
User browser > Local server - Core/User LAST. Server packages are detected
structurally: their first option has data-font-package === value.
3. The base font select (#simple_edit_options_font) gets its selected value from
the stored options (#TemplateConfiguration_options JSON, fallback
data-inheritvalue), and on form submit the chosen value is patched into that
JSON — so the base font displays and saves correctly even if options.js did
not run. NOTE: registerScript needs an explicit position ('POS_END') — the
default position resolves to '' which CClientScript never renders. #}
{{ registerScript ( 'respondage-font-dropdown-order' , "(function(){var rank=function(label){var l=String(label||'').toLowerCase();if(l.indexOf('custom')!==-1){return 0;}if(l.indexOf('bundled')!==-1){return 1;}if(l.indexOf('user')!==-1){return 2;}return 3;};var isSrv=function(og){var o=og.querySelector('option');return !!(o&&o.getAttribute('data-font-package')===o.getAttribute('value'));};var fix=function(){var selects=document.querySelectorAll('.selector_fontselect');Array.prototype.forEach.call(selects,function(sel){Array.prototype.slice.call(sel.children).forEach(function(el){if(el.tagName==='OPTGROUP'&&!el.querySelector('option')){el.parentNode.removeChild(el);}});var groups=Array.prototype.slice.call(sel.children).filter(function(el){return el.tagName==='OPTGROUP';});groups.sort(function(a,b){var as=isSrv(a),bs=isSrv(b);if(as!==bs){return as?1:-1;}if(as&&bs){return 0;}return rank(a.getAttribute('label'))-rank(b.getAttribute('label'));});groups.forEach(function(g){sel.appendChild(g);});});var base=document.getElementById('simple_edit_options_font');if(base){var stored=null;var f=document.getElementById('TemplateConfiguration_options');if(f){try{var o=JSON.parse(f.value);if(o&&o.font){stored=o.font;}}catch(e){}}if(!stored&&base.getAttribute('data-inheritvalue')){stored=base.getAttribute('data-inheritvalue');}if(stored&&base.querySelector('option[value=\"'+stored+'\"]')){base.value=stored;}}var form=document.querySelector('.action_update_options_string_form');if(form&&base){form.addEventListener('submit',function(){var f2=document.getElementById('TemplateConfiguration_options');if(!f2||!base.value){return;}try{var o2=JSON.parse(f2.value);if(o2&&typeof o2==='object'){o2.font=base.value;f2.value=JSON.stringify(o2);}}catch(e){}},true);}};if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',fix);}else{fix();}})();" , 'POS_END' ) }}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{ # CURRENT VALUES FOR SELECTS, inline (rendered into the page HTML, so it always runs
on a fresh page load — even if the browser serves a heuristically cached
options.js; options.js prepareSelectField() does the same and is idempotent).
The <option> HTML of dropdown/fontselect/imagefile comes prebuilt from core
(dropdownoptions|raw / imageOptions), so the selected option cannot be marked
server-side there — set sel.value from the stored options JSON instead. Buttons,
checkboxes, text/color inputs and the inherit options ARE marked server-side in
the markup below (checked/selected/value). When the row is "inherit", JSON.parse
fails and the server-side selected inherit options stay in charge. #}
{{ registerScript ( 'respondage-current-values' , "(function(){var f=document.getElementById('TemplateConfiguration_options');if(!f){return;}var stored=null;try{var o=JSON.parse(f.value);if(o&&typeof o==='object'){stored=o;}}catch(e){}if(!stored){return;}var sels=document.querySelectorAll('select.selector_option_value_field');Array.prototype.forEach.call(sels,function(sel){var key=sel.getAttribute('name');if(!key||!Object.prototype.hasOwnProperty.call(stored,key)){return;}var v=stored[key];if(v==null||v==='inherit'){return;}v=String(v);var ok=Array.prototype.some.call(sel.options,function(op){return op.value===v;});if(ok){sel.value=v;}});})();" , 'POS_END' ) }}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{% set bInherit = templateConfiguration .sid is not empty or templateConfiguration .gsid is not empty %}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{ # CURRENT OPTION VALUES, rendered server-side (so the selected state never depends
on options.js being fresh): parse the stored options JSON once. When the whole row
is "inherit" (survey/group level with "Inherit everything"), every option value is
"inherit" → the Inherit controls get checked/selected. Per key the fallback is the
parent (inherited) value from oParentOptions. NOTE: use "is defined" checks, NOT
|default — "0" is a legitimate value (e.g. showpopups) and |default would drop it. #}
{% set aCurrentOptions = json_decode ( templateConfiguration .options ) %}
{% set bGeneralInherit = templateConfiguration .options == 'inherit' %}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{# Options list for imagefile selects, with an <optgroup> per image group #}
{% set imageOptions = '' %}
{% set imgGroup = '' %}
fix(security): sanitize theme option values at emission (S1) and escape imagefile option HTML (S2)
S1 (HIGH, SECURITY_REVIEW_20261129.md): LimeSurvey renders theme twig with
autoescape OFF, so stored option values are untrusted on the public survey
pages. New views/subviews/security_macros.twig provides validators (color,
length, keyword, fontslug, pxnum, iconcode) applied at every emission point:
the <style> block in custom_header.twig (incl. the resolved values of the
cm()/cmbg() chooser macros), the inline style="color:..." and font-<slug>
class attributes in all survey subviews, and the <body> font class +
data-thememode in the newly overridden layout_global.twig and
layout_survey_list.twig. Crafted values fall back to the configured
defaults; legitimate picker/enum/slug values pass unchanged.
S2 (MEDIUM): options/options.twig escapes group/preview/filepath/filename
with |e('html_attr')/|e('html') when building the imagefile <option> HTML.
Verified: twig compile of all changed templates, malicious-value renders
neutralized + legit renders unchanged, live surveys 216664/282267 render
correct colors with no twig errors, jsdom custom_js tests pass (options_*
tests still need /tmp fixtures, pre-existing), export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-30 11:27:38 +01:00
{ # S2 (SECURITY_REVIEW_20261129.md): image names can also arrive via FTP/deploy/git
(NOT sanitized like uploader names) — every part below is escaped at build time;
the assembled string is output with |raw further down. #}
2026-11-24 22:04:11 +01:00
{% for image in templateConfiguration .imageFileList %}
{% if image .group != imgGroup %}
{% if imgGroup != '' %} {% set imageOptions = imageOptions ~ '</optgroup>' %} {% endif %}
2026-11-30 14:08:17 +01:00
{% set imageOptions = imageOptions ~ '<optgroup label="' ~ image .group | escape ( 'html_attr' ) ~ '">' %}
2026-11-24 22:04:11 +01:00
{% set imgGroup = image .group %}
{% endif %}
2026-11-30 14:08:17 +01:00
{% set imageOptions = imageOptions ~ '<option data-lightbox-src="' ~ image .preview | escape ( 'html_attr' ) ~ '" value="' ~ image .filepath | escape ( 'html_attr' ) ~ '">' ~ image .filename | escape ( 'html' ) ~ '</option>' %}
2026-11-24 22:04:11 +01:00
{% endfor %}
{% if imgGroup != '' %} {% set imageOptions = imageOptions ~ '</optgroup>' %} {% endif %}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
<div class="simple-template-edit-loading text-center" style="display:none">
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
</div>
2026-11-26 14:20:21 +01:00
{ # Options-page-only styles, INLINE on purpose: this admin page does NOT load the
theme's css/plain.css (that is registered for survey pages only), so anything
styled from plain.css would be unstyled here. These rules cover the
navbarfontcolor working example (row 115-118): the preset swatch chips under
the dropdown (full column width, 10px gap, hex label BELOW each swatch) and
the grayed-out look of "disable"-mode children (visible but dimmed). #}
<style>
.option-visibility-disable .mb-3 {
opacity: 0.55;
}
.color-mode-chips {
display: flex;
width: 100%;
gap: 10px;
margin-top: 0.4rem;
}
.color-chip-item {
flex: 1 1 0;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.color-chip {
width: 100%;
2026-11-26 14:23:36 +01:00
height: 3.2rem;
2026-11-26 14:20:21 +01:00
padding: 0;
border: 1px solid rgba(0, 0, 0, 0.35);
border-radius: 0.25rem;
cursor: pointer;
background: transparent;
}
.color-chip.active {
outline: 2px solid currentColor;
outline-offset: 1px;
}
.color-chip:focus-visible {
outline: 2px solid #0d6efd;
outline-offset: 1px;
}
.color-chip-label {
2026-11-26 14:23:36 +01:00
width: 100%;
font-size: 1rem;
2026-11-26 14:20:21 +01:00
color: #6c757d;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
fix(options): mark the default color choice with [ ] in the dropdown, not bold
Row 134: bolding <option> text is not rendered by every browser (native
dropdown popups ignore it), so the default entry of a color-chooser dropdown
is now enclosed in square brackets instead — e.g. "[Default font color]
[#444444]". The brackets live in config.xml on the <option data-default="1">
(navbarfontcolor + the five <el>textcolor dropdowns), so they show even before
JS runs; options.js strips and re-adds them idempotently while appending the
live hexcode. Removed from the dropdown list: the <b> wrap (row 129), the
inline font-weight (row 132), the CSS option[data-default] rule and the
:has() closed-select rule. The bold REMAINS only on the swatch label below the
swatch (.color-chip-label.is-default), where it renders reliably.
OPTIONS_JS_TOKEN -> 20261126.13. Verified: render tc=618 (raw option
"[Default font color]", served options.js?v=20261126.13), jsdom 6/6 incl.
pins (label "[Default font color] [#444444]", no <b>/inline bold/stale CSS
rules, non-default not bracketed, swatch label still bold), export exit 0.
Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 18:51:41 +01:00
/* row 126/134: the DEFAULT choice of a color-chooser option (the config.xml
<option data-default="1">) is enclosed in [ ] in the dropdown list — bolding
<option> text is not rendered by every browser, so brackets are used there
instead. The bold remains ONLY on the swatch label below the swatch
(is-default class set by options.js). */
2026-11-26 15:50:28 +01:00
.color-chip-label.is-default {
font-weight: 700;
color: #212529;
}
2026-11-26 15:52:43 +01:00
/* row 127: labels ABOVE the option fields at 16px (they were the same size
as the option texts at 14px). Only .form-label — the labels NEXT TO the
checkboxes (.form-check-label) are deliberately NOT touched. */
.action_update_options_string_form .form-label {
font-size: 16px;
}
2026-11-29 14:04:19 +01:00
/* row 177: 15px between the LAST checkbox of a checkbox group and the
following item (.checkbox-last is set in twig on the last checkbox of
each consecutive run; beats .mb-1 by specificity) */
.form-check.checkbox-last {
margin-bottom: 15px;
}
2026-11-26 16:36:11 +01:00
/* row 128/130: the section headers this page inserts (h2 inside the tab
2026-11-29 11:56:04 +01:00
panes, e.g. "Header", "Logos", "Page background") — row 128 made them
2026-11-26 16:36:11 +01:00
h1-sized, which turned out too big, so row 130 fixes them at 24px.
The modal title h2.modal-title is outside .tab-content and excluded. */
2026-11-26 15:55:28 +01:00
.tab-content h2:not(.modal-title) {
2026-11-26 16:36:11 +01:00
font-size: 24px;
2026-11-26 15:55:28 +01:00
}
2026-11-29 14:47:56 +01:00
/* row 181: the h3 section headers inside the tab panes (e.g. "Overall
question" and "Question title and body" in the Questions tab) — 20px,
one step below the 24px h2 pane titles. The modal title is excluded
like for h2 above. */
.tab-content h3:not(.modal-title) {
font-size: 20px;
}
2026-11-29 15:11:15 +01:00
/* row 185: the horizontal lines (<hr> in the tab panes: questions-section-hr,
top-section-hr, logo-columns-hr, images-col1-hr, ...) and the vertical
column dividers (.border-start) all in one color #5e5c64. Bootstrap's hr
uses background-color: currentColor at opacity .25, so color + opacity are
both set; .border-start needs !important to beat Bootstrap's own !important. */
.tab-content hr {
color: #5e5c64;
opacity: 1;
}
.tab-content .border-start {
border-left-color: #5e5c64 !important;
}
fix(options): row 198 — restore 3-column section layouts in the Questions tab; make border radii a real 2x2 subcolumn grid
- aQSlots back to the row 178 plan / row 195 layouts: title = 3 columns
(col 1 font+font color+size+options+legacy picker, col 2 title bg
chooser, col 3 body bg chooser), answers = col 1 font+font color,
col 2 checkbox chooser (column 2 as row 195), help = 3 columns
(col 1 font+font color, col 2 bg chooser, col 3 text position);
config.xml order already matched, only the slots changed
- border radii: the col-md-6 wrappers sat directly in the block-level
col-md-4 column, so width:50% stacked them vertically instead of two
per row — .questions-col-border-2 is now display:flex + flex-wrap,
so TL/TR form row 1, the hr its own line, BL/BR (border-start) row 2
- config.xml: refreshed the stale Questions-tab comment to describe the
section layout; all variants rebuilt + example config synced
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:47:12 +01:00
/* row 198: the "Question border" section's third column (questions-col-border-2)
holds the four radius options as col-md-6 wrappers (2x2 subcolumns). A Bootstrap
col-* is display:block, so without this the width:50% wrappers would STACK
vertically instead of sitting two per row. Making the column itself a flex row
turns the wrappers into real flex items: TL TR on row 1, the col-12 hr on its
own line, BL BR (border-start) on the last row. */
.tab-content .questions-col-border-2 {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
2026-11-29 16:49:36 +01:00
/* row 199: the four radius inputs are capped in width (a "5px" value does not
need a full half-column), so the two inputs of a subcolumn row no longer
touch each other */
.tab-content .questions-col-border-2 input.form-control {
max-width: 8rem;
}
2026-11-26 20:27:25 +01:00
/* row 143/145: in the color picker input group the swatch part (.input-group-text
holding input[type=color]) must be exactly as high as the text input. Setting
the height only on the inner color input was not enough in the real admin page,
so BOTH direct children of the group now get the same explicit height:
calc(1.5rem + 0.75rem + 2px) = the .form-control line box incl. padding and
border (specificity beats any framework .form-control/.input-group-text rule).
The swatch input keeps its own size, centered by the flex .input-group-text.
(The third part of the group, the appended effective-color swatch, was
removed — see options.js.) */
.input-group > .style__colorpicker,
.input-group > .selector__color-picker {
height: calc(1.5rem + 0.75rem + 2px);
box-sizing: border-box;
}
2026-11-26 20:09:56 +01:00
.input-group > .style__colorpicker input[type="color"] {
display: block;
width: 2.5em;
height: 1.5em;
padding: 0;
border: 0;
2026-11-26 14:20:21 +01:00
background: transparent;
2026-11-26 20:09:56 +01:00
cursor: pointer;
2026-11-26 14:20:21 +01:00
}
</style>
2026-11-24 22:04:11 +01:00
{# If this is a survey-specific (or survey-group) settings page, offer full inheritance of the parent template #}
{% if bInherit %}
<div class="row" id="general_inherit_active">
<label id="inherit_label_announcement" class="form-label"> {{ gT ( "Inherit everything" ) }} </label>
<div class="col-12" role="radiogroup" aria-labelledby="inherit_label_announcement">
<div class="btn-group" data-bs-toggle="buttons">
<input id="general_inherit_on" name="general_inherit" type="radio" value="on"
{% if bGeneralInherit %} checked {% endif %}
class="btn-check selector_option_general_inherit" data-id="simple_edit_options_general_inherit"/>
<label for="general_inherit_on" class="btn btn-outline-secondary {% if bGeneralInherit %} active {% endif %} "> {{ gT ( "Inherited" ) }} </label>
<input id="general_inherit_off" name="general_inherit" type="radio" value="off"
{% if not bGeneralInherit %} checked {% endif %}
class="btn-check selector_option_general_inherit" data-id="simple_edit_options_general_inherit"/>
<label for="general_inherit_off" class="btn btn-outline-secondary {% if not bGeneralInherit %} active {% endif %} "> {{ gT ( "Customize theme" ) }} </label>
</div>
2026-06-17 10:06:07 +02:00
</div>
</div>
2026-11-24 22:04:11 +01:00
<div class="row action_hide_on_inherit">
<hr/>
</div>
{% endif %}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{ # Every tab pane ends with the Respondage footer. The logo uses a dedicated file
name (not logo.png) on purpose: variants may ship their own files/logo.png as
client logo, and imageSrc() resolves './files/...' in the variant first — with
this name it falls through to the mother theme, so the footer always shows the
Respondage logo. #}
{% set respondageLogo = imageSrc ( './files/respondage-logo.png' ) %}
{ # Options that make up the TOP OF THE PAGE (everything in the header, plus the
progress bar which sits in/just under the header): the menu (navbar text color),
the left/center/right logos, the header background color, and the progress bar
position + colors. These keys are pulled out of their original config.xml
categories (Colors / Images / Progress) into a dedicated FIRST tab below.
Values are stored per option key, so moving them here does not change any stored
value. The order of this list is the order shown in the tab. #}
{% set aTopOfPageKeys = [
2026-11-26 19:25:22 +01:00
'headerfont', 'navbarfontcolor', 'navbarfontcolorcustom', 'headerbackgroundcolor', 'headerbackgroundcolorcustom',
feat(theme): default logos left/center/right + 30px top margin + 90px header bar
Row 138: default look of the mother theme:
- brandlogofile default -> ./files/logo-left.png (left)
- centerlogofile default -> ./files/logo.png (center, was "off")
- rightlogofile default -> ./files/logo-right.png (right, was "off")
so all three logos are visible by default
- brand/center/rightlogotopmargin defaults 15 -> 30 (px added in the view)
- new option headerheight (Top of the page tab, col 3 next to the sticky
checkboxes, default 90) applied in custom_header.twig as min-height on
#survey-nav (min-height so taller logos can still grow the bar; the sticky
body padding in scripts/custom.js follows the real nav height)
- sticky defaults were already computer on / tablet on / mobile off (unchanged)
Core normalizes ./files/x on theme reset to image::theme::files/x, so the
config defaults keep the ./files/ style like the existing one. The PNG files
logo-left.png / logo-right.png remain the owner's untracked files (Prompt PL).
Verified: options render tc=633 (headerheight field present, logo dropdowns
list all three files, divs balanced); live survey 282267 with the defaults
applied to the DB row: three logo imgs (logo-left/logo/logo-right),
padding-top 30px on all logo imgs, min-height 90px on #survey-nav, fixed-top
media queries only for computer+tablet (mobile non-sticky) — DB row restored
afterwards; jsdom 7/7; export exit 0. Theme reset needed for the new defaults
to land in the DB. Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:41:12 +01:00
'headersticky', 'headerstickycomputer', 'headerstickytablet', 'headerstickymobile', 'headerheight',
feat(options): logo section as 3 columns (file/margin/per-device) in Top-of-page tab
Prompt M: per logo position (left=brand, center, right) the options page now
shows one column with vertical separators and an <hr> below: file dropdown
with 'No logo' (off) first, top margin as plain number 0-100, and 'Show logo
on' with computer/tablet/mobile checkboxes. New option keys per position:
<pos>logofile, <pos>logotopmargin, <pos>showon{computer,tablet,mobile};
old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, shared
logotopmargin) removed from config.xml. Views map the checkboxes to
Bootstrap display classes per breakpoint and emit per-logo padding-top;
variants/build.php migrates the old json keys to the new ones.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 23:14:10 +01:00
'brandlogofile', 'brandlogotopmargin', 'brandshowoncomputer', 'brandshowontablet', 'brandshowonmobile',
'centerlogofile', 'centerlogotopmargin', 'centershowoncomputer', 'centershowontablet', 'centershowonmobile',
'rightlogofile', 'rightlogotopmargin', 'rightshowoncomputer', 'rightshowontablet', 'rightshowonmobile',
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
'progressbarposition', 'progressbarfont', 'progressbarcolor', 'progressbarcolorcustom',
'progressbarbackgroundcolor', 'progressbarbackgroundcolorcustom', 'progressbarfontcolor', 'progressbarfontcolorcustom'
2026-11-24 22:04:11 +01:00
] %}
feat(options): logo section as 3 columns (file/margin/per-device) in Top-of-page tab
Prompt M: per logo position (left=brand, center, right) the options page now
shows one column with vertical separators and an <hr> below: file dropdown
with 'No logo' (off) first, top margin as plain number 0-100, and 'Show logo
on' with computer/tablet/mobile checkboxes. New option keys per position:
<pos>logofile, <pos>logotopmargin, <pos>showon{computer,tablet,mobile};
old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, shared
logotopmargin) removed from config.xml. Views map the checkboxes to
Bootstrap display classes per breakpoint and emit per-logo padding-top;
variants/build.php migrates the old json keys to the new ones.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 23:14:10 +01:00
{% set aLogoKeys = [
'brandlogofile', 'brandlogotopmargin', 'brandshowoncomputer', 'brandshowontablet', 'brandshowonmobile',
'centerlogofile', 'centerlogotopmargin', 'centershowoncomputer', 'centershowontablet', 'centershowonmobile',
'rightlogofile', 'rightlogotopmargin', 'rightshowoncomputer', 'rightshowontablet', 'rightshowonmobile'
] %}
{% set aLogoPositions = [ 'brand' , 'center' , 'right' ] %}
2026-11-24 23:23:59 +01:00
{% set aProgressKeys = [ 'progressbarposition' , 'progressbarbackgroundcolor' , 'progressbarcolor' , 'progressbarfontcolor' ] %}
2026-11-25 13:34:40 +01:00
{% set aTopStickyKeys = [ 'headersticky' , 'headerstickycomputer' , 'headerstickytablet' , 'headerstickymobile' ] %}
2026-11-25 14:23:24 +01:00
{% set aFontElements = [ 'questiontitle' , 'answers' , 'grouptitle' , 'groupdescription' , 'buttons' ] %}
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
2026-11-29 15:08:49 +01:00
{ # row 180 / plan P2: the Questions "title" section keys joined the chooser scheme
(questiontitletextcolor, questiontitlebackgroundcolor, questionbackgroundcolor);
2026-11-29 15:17:56 +01:00
row 184 / plan P3: answerstextcolor as well; row 186 / plan P4:
questionhelpbackgroundcolor as well. Must stay in sync with
2026-11-29 15:08:49 +01:00
aColorChooserKeys in options/options.js. #}
2026-11-30 10:01:49 +01:00
{% set aColorChooserKeys = [ 'navbarfontcolor' , 'headerbackgroundcolor' , 'progressbarcolor' , 'progressbarbackgroundcolor' , 'progressbarfontcolor' , 'bodybackgroundcolor' , 'grouptitletextcolor' , 'groupdescriptiontextcolor' , 'questiontitletextcolor' , 'questiontitlebackgroundcolor' , 'questionbackgroundcolor' , 'answerstextcolor' , 'questionhelpbackgroundcolor' , 'questionhelpfontcolor' , 'questionbordercolor' , 'checkboxcolor' , 'sliderhandlecolor' , 'previousbuttonbackgroundcolor' , 'previousbuttontextcolor' , 'nextbuttonbackgroundcolor' , 'nextbuttontextcolor' , 'submitbuttonbackgroundcolor' , 'submitbuttontextcolor' ] %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
{% set aShowIfValues = { 'questionborder' : 'box|top' , 'navbarfontcolor' : 'other' } %}
feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers
(+custom children), both default mode 'default' (Default font color);
resolved via cmm.cm() in custom_header.twig (legacy hex passthrough)
- border radii show only for questionborder=box (per-key show-values in
options.twig aShowIfValuesByKey); options.js cascades hiding to nested
conditional wrappers (questionbordercolorcustom); radii stay two
subcolumns (border-start on TR/BR)
- chooser columns aligned with the font color: title section = one column
(title-0: font, font color, size/options, legacy picker, title bg, body
bg), answers-0 += checkbox chooser, help-0 = font + font color + bg
chooser, help-1 = text position
- all font-color labels follow 'Font color for ...' / 'Custom font color
for ...' (21 labels renamed, incl. 'Font color for question titles' and
'Font color for answers and subquestions')
- chooser key lists synced in options.twig/options.js/build.php (+2)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:30:39 +01:00
{ # row 197: per-KEY show-value override — the four border radii show ONLY for
"box" (Box around), while the other border children (color/style/shadow) keep
the parent's "box|top". Looked up by the option's own key, so it wins over the
parent's entry above and lands as data-show-if-value on the wrapper. #}
{% set aShowIfValuesByKey = { 'questionborderradiusTL' : 'box' , 'questionborderradiusTR' : 'box' , 'questionborderradiusBL' : 'box' , 'questionborderradiusBR' : 'box' } %}
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
{% for el in aFontElements %} {% set aShowIfValues = aShowIfValues | merge ( { ( el ~ 'textcolor' ) : 'other' } ) %} {% endfor %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{% for ck in aColorChooserKeys %} {% set aShowIfValues = aShowIfValues | merge ( { ( ck ) : 'other' } ) %} {% endfor %}
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
{ # How a parented option behaves when the parent's value is NOT in the show-values:
default 'hide' = wrapper gets d-none; 'disable' = wrapper STAYS VISIBLE but the
child control is rendered disabled (grayed out) and carries data-keep-value so
options.js keeps its stored value across saves. Working example: navbarfontcolor
(row 115) — the custom color picker stays visible next to the mode dropdown. #}
{% set aShowIfMode = { 'navbarfontcolor' : 'disable' } %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{% for ck in aColorChooserKeys %} {% set aShowIfMode = aShowIfMode | merge ( { ( ck ) : 'disable' } ) %} {% endfor %}
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
2026-11-29 11:56:04 +01:00
{ # row 174: the "Default font and colors" pane is ONE row with three col-md-4
columns: col 1 = font, fontsize, fontcolor; col 2 = defaultbackgroundcolor;
col 3 = primarycolor, secondarycolor, tertiarycolor (slot mapping below) #}
{% set aFontsCol1 = [ 'font' , 'fontsize' , 'fontcolor' ] %}
{% set aFontsCol2 = [ 'defaultbackgroundcolor' ] %}
{% set aFontsCol3 = [ 'primarycolor' , 'secondarycolor' , 'tertiarycolor' ] %}
2026-11-25 11:35:18 +01:00
2026-11-29 15:17:56 +01:00
{ # row 186 / plan P4: the help keys moved into their own "Question help" section
(aQSlots above) — legacy column 1 is empty now #}
{% set aQuestionsCol1 = [ ] %}
2026-11-29 15:26:36 +01:00
{ # row 188 / plan P5: the border keys moved into their own "Question border"
section (aQSlots above) — legacy column 2 is empty now #}
{% set aQuestionsCol2 = [ ] %}
2026-11-29 16:05:39 +01:00
{ # row 195: checkboxcolor moved into the answers section (answers:1 below) —
legacy column 3 is empty now #}
{% set aQuestionsCol3 = [ ] %}
2026-11-29 14:45:57 +01:00
{ # row 178/179 plan: the Questions pane is built from SECTIONS — each section is an
h3 + its own row of columns and ends with a full-width hr. aQSections lists the
sections (id, h3, colClass); aQSlots maps each option key to "sectionId:colIndex".
Keys not in aQSlots fall back to the legacy columns aQuestionsCol1/2/3 ("legacy:N")
or the full-width rest ("rest"). P1 added "overall", P2 added "title"; P3-P5 add
the remaining sections. #}
2026-11-29 15:02:46 +01:00
{ # row 183: the "Overall question" section is a THREE-column grid (colClass
2026-11-29 15:08:49 +01:00
col-md-4), only the first column is used (the two distance options).
Row 184 / plan P3: same for "Answer options and subquestions" (answers*) #}
2026-11-29 14:45:57 +01:00
{% set aQSections = [
2026-11-29 15:02:46 +01:00
{ 'id': 'overall', 'h3': 'Overall question', 'colClass': 'col-md-4' },
2026-11-29 15:08:49 +01:00
{ 'id': 'title', 'h3': 'Question title and body', 'colClass': 'col-md-4' },
2026-11-29 15:17:56 +01:00
{ 'id': 'answers', 'h3': 'Answer options and subquestions', 'colClass': 'col-md-4' },
2026-11-29 15:26:36 +01:00
{ 'id': 'help', 'h3': 'Question help', 'colClass': 'col-md-4' },
{ 'id': 'border', 'h3': 'Question border', 'colClass': 'col-md-4' }
2026-11-29 14:45:57 +01:00
] %}
fix(options): row 198 — restore 3-column section layouts in the Questions tab; make border radii a real 2x2 subcolumn grid
- aQSlots back to the row 178 plan / row 195 layouts: title = 3 columns
(col 1 font+font color+size+options+legacy picker, col 2 title bg
chooser, col 3 body bg chooser), answers = col 1 font+font color,
col 2 checkbox chooser (column 2 as row 195), help = 3 columns
(col 1 font+font color, col 2 bg chooser, col 3 text position);
config.xml order already matched, only the slots changed
- border radii: the col-md-6 wrappers sat directly in the block-level
col-md-4 column, so width:50% stacked them vertically instead of two
per row — .questions-col-border-2 is now display:flex + flex-wrap,
so TL/TR form row 1, the hr its own line, BL/BR (border-start) row 2
- config.xml: refreshed the stale Questions-tab comment to describe the
section layout; all variants rebuilt + example config synced
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:47:12 +01:00
{ # row 198 (back to the row 178 plan P2/P3 + row 195 layouts): every section is a
THREE-column grid (colClass col-md-4) and the columns are filled side by side,
so related choosers sit next to each other on one row:
title: col 1 = font + font color (+custom) + size + options + legacy picker (P2),
col 2 = title background chooser (+custom), col 3 = body background chooser (+custom)
2026-11-30 10:01:49 +01:00
answers: col 1 = font + font color (+custom), col 2 = checkbox/radiobutton chooser (+custom) (row 195),
col 3 = slider handle color chooser (+custom) (row 221)
fix(options): row 198 — restore 3-column section layouts in the Questions tab; make border radii a real 2x2 subcolumn grid
- aQSlots back to the row 178 plan / row 195 layouts: title = 3 columns
(col 1 font+font color+size+options+legacy picker, col 2 title bg
chooser, col 3 body bg chooser), answers = col 1 font+font color,
col 2 checkbox chooser (column 2 as row 195), help = 3 columns
(col 1 font+font color, col 2 bg chooser, col 3 text position);
config.xml order already matched, only the slots changed
- border radii: the col-md-6 wrappers sat directly in the block-level
col-md-4 column, so width:50% stacked them vertically instead of two
per row — .questions-col-border-2 is now display:flex + flex-wrap,
so TL/TR form row 1, the hr its own line, BL/BR (border-start) row 2
- config.xml: refreshed the stale Questions-tab comment to describe the
section layout; all variants rebuilt + example config synced
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:47:12 +01:00
help: col 1 = help font + font color (+custom), col 2 = help background chooser (+custom),
col 3 = help text position (row 195)
border: col 1 = border type, col 2 = color/style/shadow children, col 3 = the four radii (2x2)
The config.xml order inside the Questions category already matches this grouping,
so each slot renders as exactly one column.
feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers
(+custom children), both default mode 'default' (Default font color);
resolved via cmm.cm() in custom_header.twig (legacy hex passthrough)
- border radii show only for questionborder=box (per-key show-values in
options.twig aShowIfValuesByKey); options.js cascades hiding to nested
conditional wrappers (questionbordercolorcustom); radii stay two
subcolumns (border-start on TR/BR)
- chooser columns aligned with the font color: title section = one column
(title-0: font, font color, size/options, legacy picker, title bg, body
bg), answers-0 += checkbox chooser, help-0 = font + font color + bg
chooser, help-1 = text position
- all font-color labels follow 'Font color for ...' / 'Custom font color
for ...' (21 labels renamed, incl. 'Font color for question titles' and
'Font color for answers and subquestions')
- chooser key lists synced in options.twig/options.js/build.php (+2)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:30:39 +01:00
NOTE: no {# #} comments inside the array literal (twig SyntaxError). #}
2026-11-29 14:45:57 +01:00
{% set aQSlots = {
'questiondistance': 'overall:0', 'questiondistancebottom': 'overall:0',
'questiontitlefont': 'title:0', 'questiontitletextcolor': 'title:0', 'questiontitletextcolorcustom': 'title:0',
'questiontitlefontsize': 'title:0', 'questiontitlefontoptions': 'title:0', 'questiontitlefontcolor': 'title:0',
fix(options): row 198 — restore 3-column section layouts in the Questions tab; make border radii a real 2x2 subcolumn grid
- aQSlots back to the row 178 plan / row 195 layouts: title = 3 columns
(col 1 font+font color+size+options+legacy picker, col 2 title bg
chooser, col 3 body bg chooser), answers = col 1 font+font color,
col 2 checkbox chooser (column 2 as row 195), help = 3 columns
(col 1 font+font color, col 2 bg chooser, col 3 text position);
config.xml order already matched, only the slots changed
- border radii: the col-md-6 wrappers sat directly in the block-level
col-md-4 column, so width:50% stacked them vertically instead of two
per row — .questions-col-border-2 is now display:flex + flex-wrap,
so TL/TR form row 1, the hr its own line, BL/BR (border-start) row 2
- config.xml: refreshed the stale Questions-tab comment to describe the
section layout; all variants rebuilt + example config synced
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:47:12 +01:00
'questiontitlebackgroundcolor': 'title:1', 'questiontitlebackgroundcolorcustom': 'title:1',
'questionbackgroundcolor': 'title:2', 'questionbackgroundcolorcustom': 'title:2',
2026-11-29 15:17:56 +01:00
'answersfont': 'answers:0', 'answerstextcolor': 'answers:0', 'answerstextcolorcustom': 'answers:0',
fix(options): row 198 — restore 3-column section layouts in the Questions tab; make border radii a real 2x2 subcolumn grid
- aQSlots back to the row 178 plan / row 195 layouts: title = 3 columns
(col 1 font+font color+size+options+legacy picker, col 2 title bg
chooser, col 3 body bg chooser), answers = col 1 font+font color,
col 2 checkbox chooser (column 2 as row 195), help = 3 columns
(col 1 font+font color, col 2 bg chooser, col 3 text position);
config.xml order already matched, only the slots changed
- border radii: the col-md-6 wrappers sat directly in the block-level
col-md-4 column, so width:50% stacked them vertically instead of two
per row — .questions-col-border-2 is now display:flex + flex-wrap,
so TL/TR form row 1, the hr its own line, BL/BR (border-start) row 2
- config.xml: refreshed the stale Questions-tab comment to describe the
section layout; all variants rebuilt + example config synced
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:47:12 +01:00
'checkboxcolor': 'answers:1', 'checkboxcolorcustom': 'answers:1',
2026-11-30 10:01:49 +01:00
'sliderhandlecolor': 'answers:2', 'sliderhandlecolorcustom': 'answers:2',
feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers
(+custom children), both default mode 'default' (Default font color);
resolved via cmm.cm() in custom_header.twig (legacy hex passthrough)
- border radii show only for questionborder=box (per-key show-values in
options.twig aShowIfValuesByKey); options.js cascades hiding to nested
conditional wrappers (questionbordercolorcustom); radii stay two
subcolumns (border-start on TR/BR)
- chooser columns aligned with the font color: title section = one column
(title-0: font, font color, size/options, legacy picker, title bg, body
bg), answers-0 += checkbox chooser, help-0 = font + font color + bg
chooser, help-1 = text position
- all font-color labels follow 'Font color for ...' / 'Custom font color
for ...' (21 labels renamed, incl. 'Font color for question titles' and
'Font color for answers and subquestions')
- chooser key lists synced in options.twig/options.js/build.php (+2)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:30:39 +01:00
'questionhelpfont': 'help:0', 'questionhelpfontcolor': 'help:0', 'questionhelpfontcolorcustom': 'help:0',
fix(options): row 198 — restore 3-column section layouts in the Questions tab; make border radii a real 2x2 subcolumn grid
- aQSlots back to the row 178 plan / row 195 layouts: title = 3 columns
(col 1 font+font color+size+options+legacy picker, col 2 title bg
chooser, col 3 body bg chooser), answers = col 1 font+font color,
col 2 checkbox chooser (column 2 as row 195), help = 3 columns
(col 1 font+font color, col 2 bg chooser, col 3 text position);
config.xml order already matched, only the slots changed
- border radii: the col-md-6 wrappers sat directly in the block-level
col-md-4 column, so width:50% stacked them vertically instead of two
per row — .questions-col-border-2 is now display:flex + flex-wrap,
so TL/TR form row 1, the hr its own line, BL/BR (border-start) row 2
- config.xml: refreshed the stale Questions-tab comment to describe the
section layout; all variants rebuilt + example config synced
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:47:12 +01:00
'questionhelpbackgroundcolor': 'help:1', 'questionhelpbackgroundcolorcustom': 'help:1',
'questionhelptextposition': 'help:2',
2026-11-29 15:26:36 +01:00
'questionborder': 'border:0',
feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers
(+custom children), both default mode 'default' (Default font color);
resolved via cmm.cm() in custom_header.twig (legacy hex passthrough)
- border radii show only for questionborder=box (per-key show-values in
options.twig aShowIfValuesByKey); options.js cascades hiding to nested
conditional wrappers (questionbordercolorcustom); radii stay two
subcolumns (border-start on TR/BR)
- chooser columns aligned with the font color: title section = one column
(title-0: font, font color, size/options, legacy picker, title bg, body
bg), answers-0 += checkbox chooser, help-0 = font + font color + bg
chooser, help-1 = text position
- all font-color labels follow 'Font color for ...' / 'Custom font color
for ...' (21 labels renamed, incl. 'Font color for question titles' and
'Font color for answers and subquestions')
- chooser key lists synced in options.twig/options.js/build.php (+2)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:30:39 +01:00
'questionbordercolor': 'border:1', 'questionbordercolorcustom': 'border:1', 'questionborderstyle': 'border:1', 'questiondropdown': 'border:1',
2026-11-29 15:26:36 +01:00
'questionborderradiusTL': 'border:2', 'questionborderradiusTR': 'border:2',
'questionborderradiusBL': 'border:2', 'questionborderradiusBR': 'border:2'
2026-11-29 14:45:57 +01:00
} %}
2026-11-25 11:35:18 +01:00
2026-11-26 20:39:44 +01:00
{ # row 147: all group-related options of the "Questions" category — they are
pulled out of the Questions tab into a dedicated "Groups" tab (aGroupsTab below).
2026-11-27 02:50:06 +01:00
Values are stored per option key, so moving them does not change stored values.
Row 157: the Groups pane is laid out in TWO columns (slots g1/g2 below):
col 1 = group title options, col 2 = group description options. #}
2026-11-26 20:39:44 +01:00
{% set aGroupKeys = [
2026-11-27 02:50:06 +01:00
'grouptitlefont', 'grouptitletextcolor', 'grouptitletextcolorcustom', 'grouptitlefontsize', 'grouptitlefontoptions',
'groupdescriptionfont', 'groupdescriptiontextcolor', 'groupdescriptiontextcolorcustom', 'groupdescriptionfontsize', 'groupdescriptionfontoptions'
2026-11-26 20:39:44 +01:00
] %}
2026-11-27 02:50:06 +01:00
{% set aGroupCol1 = [ 'grouptitlefont' , 'grouptitletextcolor' , 'grouptitletextcolorcustom' , 'grouptitlefontsize' , 'grouptitlefontoptions' ] %}
{% set aGroupCol2 = [ 'groupdescriptionfont' , 'groupdescriptiontextcolor' , 'groupdescriptiontextcolorcustom' , 'groupdescriptionfontsize' , 'groupdescriptionfontoptions' ] %}
2026-11-26 20:39:44 +01:00
2026-11-29 15:48:26 +01:00
{ # row 191 / row 178 plan P6: the Buttons pane — a full-width font row at the top
(buttonsfont), then ONE row with three col-md-4 columns: col 1 = Previous,
col 2 = Next, col 3 = Submit (row-178 decision 1); each column holds that
button's background color chooser (+custom) and text color chooser (+custom). #}
{% set aButtonsCol1 = [ 'previousbuttonbackgroundcolor' , 'previousbuttonbackgroundcolorcustom' , 'previousbuttontextcolor' , 'previousbuttontextcolorcustom' ] %}
{% set aButtonsCol2 = [ 'nextbuttonbackgroundcolor' , 'nextbuttonbackgroundcolorcustom' , 'nextbuttontextcolor' , 'nextbuttontextcolorcustom' ] %}
{% set aButtonsCol3 = [ 'submitbuttonbackgroundcolor' , 'submitbuttonbackgroundcolorcustom' , 'submitbuttontextcolor' , 'submitbuttontextcolorcustom' ] %}
2026-11-29 11:56:04 +01:00
{ # Tab list: FIRST the "Default font and colors" tab (where the default/base font
and the default colors are chosen), then the "Header" tab
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
tab (keys = aTopOfPageKeys), then row 147: the "Page background" tab (the
config.xml "Page background" category, id kept as 'category-images' so the
stored tab preference stays valid), then the "Groups" tab (keys = aGroupKeys),
then one tab per remaining category from config.xml like the core options page
(keys = null: all options of that category). Row 159: config.xml category names
equal these tab labels. #}
2026-11-24 22:04:11 +01:00
{% set aTabs = [ ] %}
2026-11-29 11:56:04 +01:00
{% if 'Default font and colors' in aOptionAttributes .categories %}
{% set aTabs = [ { 'id' : 'category-fonts' , 'label' : 'Default font and colors' , 'category' : 'Default font and colors' , 'keys' : null } ] %}
2026-11-24 22:04:11 +01:00
{% endif %}
2026-11-27 03:17:57 +01:00
{% set aTabs = aTabs | merge ( [ { 'id' : 'top-of-page' , 'label' : 'Header' , 'category' : 'Header' , 'keys' : aTopOfPageKeys } ] ) %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{ # row 147/159: "Page background" category -> the Page background tab, directly after
2026-11-27 03:17:57 +01:00
Header tab #}
2026-11-26 20:39:44 +01:00
{% set aImagesKeys = [ ] %}
{% for key , attr in aOptionAttributes .optionAttributes %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% if key != 'ajaxmode' and attr .category == 'Page background' and key not in aTopOfPageKeys %}
2026-11-26 20:39:44 +01:00
{% set aImagesKeys = aImagesKeys | merge ( [ key ] ) %}
{% endif %}
{% endfor %}
2026-11-27 03:40:45 +01:00
{ # 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 #}
feat(options): row 204 — place the last Colors-category options on visible tabs; park open prompts; security review filed
- sliderhandlecolor moved to the Questions category (full-width row at
the end of the Questions pane, after the border section hr);
privacybackgroundcolor moved to Page background (column 1, under the
background image switch). The Colors category is gone entirely; the
options.twig tab loop keeps a Colors exclusion as a safety net.
Both values are still applied in custom_header.twig (verified live).
Variants rebuilt + example config synced; jsdom 8/8.
- Prompt V cleanup verified: no respondage_vanilla folder/zip left in
upload/themes/survey, zero DB references (surveys, template_configuration,
lime_templates). Remaining resets/flushassets are owner actions.
- Security review (Prompt B) executed, approval-gated: report in
SECURITY_REVIEW_20261129.md (S1 HIGH raw option values into <style>/
attributes → stored XSS; S2 MEDIUM raw imagefile option HTML in
options.twig:98-104; S3-S7 info/safe), core FR filed as
FEATURE_REQUEST_security_theme_option_raw_output.md. No fixes without
owner approval.
- Parked prompts moved from prompts.md to OPEN_PROMPTS.md (findable
index): PL, HB, AN, A, C open; Z/B/V marked done. New local files
gitignored + export-excluded (OPEN_PROMPTS.md, SECURITY_REVIEW*.md).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 17:13:40 +01:00
{ # row 204: privacybackgroundcolor (moved from the removed Colors category) joins
column 1, right after the background image on/off switch #}
{% set aImagesPaneKeys = [ 'bodybackgroundcolor' , 'bodybackgroundcolorcustom' , 'backgroundimage' , 'privacybackgroundcolor' , 'backgroundimagefile' , 'backgroundimagefixed' , 'backgroundimagedisplay' ] %}
2026-11-26 20:39:44 +01:00
{% if aImagesKeys is not empty %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% set aTabs = aTabs | merge ( [ { 'id' : 'category-images' , 'label' : 'Page background' , 'category' : 'Page background' , 'keys' : aImagesPaneKeys } ] ) %}
2026-11-26 20:39:44 +01:00
{% endif %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{ # row 147/157/159: dedicated "Groups" tab with all group-related options
(category "Groups" in config.xml, listed in aGroupKeys) so the pane renders the
2026-11-27 02:50:06 +01:00
slot layout below instead of the Questions 3-column grid. #}
2026-11-26 20:39:44 +01:00
{% set aTabs = aTabs | merge ( [ { 'id' : 'groups' , 'label' : 'Groups' , 'category' : 'Groups' , 'keys' : aGroupKeys } ] ) %}
2026-11-24 22:04:11 +01:00
{% for category in aOptionAttributes .categories %}
2026-11-29 11:56:04 +01:00
{% if category != 'Default font and colors' and category != 'Header' and category != 'Colors' and category != 'Page background' and category != 'Groups' and category != 'Other options' %}
feat(options): row 204 — place the last Colors-category options on visible tabs; park open prompts; security review filed
- sliderhandlecolor moved to the Questions category (full-width row at
the end of the Questions pane, after the border section hr);
privacybackgroundcolor moved to Page background (column 1, under the
background image switch). The Colors category is gone entirely; the
options.twig tab loop keeps a Colors exclusion as a safety net.
Both values are still applied in custom_header.twig (verified live).
Variants rebuilt + example config synced; jsdom 8/8.
- Prompt V cleanup verified: no respondage_vanilla folder/zip left in
upload/themes/survey, zero DB references (surveys, template_configuration,
lime_templates). Remaining resets/flushassets are owner actions.
- Security review (Prompt B) executed, approval-gated: report in
SECURITY_REVIEW_20261129.md (S1 HIGH raw option values into <style>/
attributes → stored XSS; S2 MEDIUM raw imagefile option HTML in
options.twig:98-104; S3-S7 info/safe), core FR filed as
FEATURE_REQUEST_security_theme_option_raw_output.md. No fixes without
owner approval.
- Parked prompts moved from prompts.md to OPEN_PROMPTS.md (findable
index): PL, HB, AN, A, C open; Z/B/V marked done. New local files
gitignored + export-excluded (OPEN_PROMPTS.md, SECURITY_REVIEW*.md).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 17:13:40 +01:00
{ # The "Colors" category no longer exists (row 204: its last two options
moved to Page background and Questions) — the exclusion stays as a
safety net so a re-introduced "Colors" category never renders as a tab. #}
2026-11-24 22:57:43 +01:00
{ # Resolve this category's keys once and skip the tab entirely when none
2026-11-25 18:22:36 +01:00
remain: e.g. "Progress" — its only option (progressbarposition)
2026-11-24 22:57:43 +01:00
moved to the Top-of-page tab, so an empty tab must not be rendered. #}
{% set catKeys = [ ] %}
{% for key , attr in aOptionAttributes .optionAttributes %}
{% if key != 'ajaxmode' and attr .category == category and key not in aTopOfPageKeys %}
{% set catKeys = catKeys | merge ( [ key ] ) %}
{% endif %}
{% endfor %}
{% if catKeys is not empty %}
{% set aTabs = aTabs | merge ( [ { 'id' : 'category-' ~ category | lower | replace ( { ' ' : '-' } ) , 'label' : category , 'category' : category , 'keys' : null } ] ) %}
{% endif %}
2026-11-24 22:04:11 +01:00
{% endif %}
{% endfor %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{ # row 148/159: the "Other options" category renders LAST in the
2026-11-26 20:42:11 +01:00
tab row (id kept as 'category-simple-options' so the stored tab preference
stays valid) #}
{% set aSimpleKeys = [ ] %}
{% for key , attr in aOptionAttributes .optionAttributes %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% if key != 'ajaxmode' and attr .category == 'Other options' and key not in aTopOfPageKeys and key not in aGroupKeys %}
2026-11-26 20:42:11 +01:00
{% set aSimpleKeys = aSimpleKeys | merge ( [ key ] ) %}
{% endif %}
{% endfor %}
{% if aSimpleKeys is not empty %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% set aTabs = aTabs | merge ( [ { 'id' : 'category-simple-options' , 'label' : 'Other options' , 'category' : 'Other options' , 'keys' : null } ] ) %}
2026-11-26 20:42:11 +01:00
{% endif %}
2026-11-24 22:04:11 +01:00
<ul class="nav nav-tabs mt-3" role="tablist">
{% for tab in aTabs %}
<li class="nav-item" role="presentation">
<button class="nav-link tab_action_hide_on_inherit {% if loop .first %} active {% endif %} "
id="tab- {{ tab .id }} " data-bs-toggle="tab" data-bs-target="# {{ tab .id }} "
type="button" role="tab" aria-controls=" {{ tab .id }} "
aria-selected=" {{ loop .first ? 'true' : 'false' }} "> {{ gT ( tab .label ) }} </button>
</li>
{% endfor %}
</ul>
<div class="tab-content border border-top-0 p-3 mb-3">
{% for tab in aTabs %}
{ # Resolve which option keys this tab shows: the top-of-page tab uses the fixed
order of aTopOfPageKeys; a category tab shows its config.xml options (in
config.xml order) minus the top-of-page keys. #}
{% set aTabKeys = tab .keys %}
{% if aTabKeys is null %}
{% set aTabKeys = [ ] %}
{% for key , attr in aOptionAttributes .optionAttributes %}
2026-11-26 20:39:44 +01:00
{# row 147: group keys are excluded here — they live in the "Groups" tab #}
{% if key != 'ajaxmode' and attr .category == tab .category and key not in aTopOfPageKeys and key not in aGroupKeys %}
2026-11-24 22:04:11 +01:00
{% set aTabKeys = aTabKeys | merge ( [ key ] ) %}
2026-06-17 10:06:07 +02:00
{% endif %}
2026-11-24 22:04:11 +01:00
{% endfor %}
{% else %}
{ # the top-of-page tab also picks up options that literally carry the
2026-11-27 03:17:57 +01:00
category "Header" (so config.xml may use it after a reset) #}
2026-11-26 20:39:44 +01:00
{% if tab .id == 'top-of-page' %}
2026-11-24 22:04:11 +01:00
{% for key , attr in aOptionAttributes .optionAttributes %}
2026-11-27 03:17:57 +01:00
{% if key != 'ajaxmode' and attr .category == 'Header' and key not in aTabKeys %}
2026-11-24 22:04:11 +01:00
{% set aTabKeys = aTabKeys | merge ( [ key ] ) %}
{% endif %}
{% endfor %}
2026-11-26 20:39:44 +01:00
{% endif %}
2026-11-24 22:04:11 +01:00
{% endif %}
2026-11-29 14:04:19 +01:00
{ # row 177: keys of the LAST checkbox of each consecutive checkbox run in this
tab — its .form-check gets the extra class .checkbox-last (margin-bottom:
15px, see the style block), so there is 15px between a checkbox group and
the following item #}
{% set aLastCheckboxKeys = [ ] %}
{% for ck in aTabKeys %}
{% set cka = aOptionAttributes .optionAttributes [ ck ] ? ? null %}
{% if cka is not null and cka .type == 'checkbox' %}
{% set nka = aOptionAttributes .optionAttributes [ aTabKeys [ loop .index ] ? ? '' ] ? ? null %}
{% if nka is null or nka .type != 'checkbox' %} {% set aLastCheckboxKeys = aLastCheckboxKeys | merge ( [ ck ] ) %} {% endif %}
{% endif %}
{% endfor %}
2026-11-24 22:04:11 +01:00
<div role="tabpanel" class="CoreThemeOptions--settingsTab tab-pane {% if loop .first %} active {% endif %} "
id=" {{ tab .id }} " aria-labelledby="tab- {{ tab .id }} ">
2026-11-25 13:06:22 +01:00
{% if tab .id == 'top-of-page' %}
<div class="row action_hide_on_inherit top-of-page-intro"><div class="col-12">
<h2> {{ gT ( "Header" ) }} </h2>
<p> {{ gT ( "The header is the top part of the page, possibly containing the name of the survey, logo's and a menu. In this part of the options you can make this header more or less distinguishable from the rest of the page and you can choose if the logo should stay on top of the page after scrolling (sticky) or not." ) }} </p>
</div></div>
{% endif %}
2026-11-25 14:23:24 +01:00
{% if tab .id == 'category-fonts' %}
<div class="row action_hide_on_inherit fonts-intro"><div class="col-12">
2026-11-29 11:56:04 +01:00
<h2> {{ gT ( "Default font and colors" ) }} </h2>
2026-11-25 14:23:24 +01:00
<p> {{ gT ( "Here you choose the default font, the font that is used on most places in your version of the theme." ) }} </p>
</div></div>
{% endif %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% if tab .category == 'Page background' %}
2026-11-26 20:57:07 +01:00
{ # row 149: full-width intro of the Page background tab; bgImgVal is the current
value of the backgroundimage on/off switch (drives the col-2 visibility) #}
{% set bgImgVal = bGeneralInherit ? 'inherit' : ( aCurrentOptions [ 'backgroundimage' ] is defined ? aCurrentOptions [ 'backgroundimage' ] : ( oParentOptions [ 'backgroundimage' ] is defined ? oParentOptions [ 'backgroundimage' ] : '' ) ) %}
<div class="row action_hide_on_inherit images-intro"><div class="col-12">
<h2> {{ gT ( "Page background (behind the body of the page)" ) }} </h2>
<p> {{ gT ( "Set the page background here. Either just a solid color or an image." ) }} </p>
</div></div>
{% endif %}
2026-11-27 02:50:06 +01:00
{% if tab .id == 'groups' %}
{# row 157: full-width intro of the Groups tab, above the two columns #}
<div class="row action_hide_on_inherit groups-intro"><div class="col-12">
<h2> {{ gT ( "Groups" ) }} </h2>
<p> {{ gT ( "Groups are more or less the same as pages. In the survey settings you can decide to show or hide the group title and the group description. Here you choose how they look when shown." ) }} </p>
</div></div>
{% endif %}
2026-11-29 14:27:52 +01:00
{% if tab .category == 'Questions' %}
{# row 179 / plan P1: h2 + intro of the Questions tab #}
<div class="row action_hide_on_inherit questions-intro"><div class="col-12">
<h2> {{ gT ( "Questions" ) }} </h2>
<p> {{ gT ( "Questions are the core of a survey. Here you create your own design of how questions are displayed to your respondent." ) }} </p>
</div></div>
{% endif %}
2026-11-29 15:48:26 +01:00
{% if tab .category == 'Buttons' %}
{# row 191 / plan P6: h2 + intro of the Buttons tab #}
<div class="row action_hide_on_inherit buttons-intro"><div class="col-12">
<h2> {{ gT ( "Buttons" ) }} </h2>
<p> {{ gT ( "The buttons at the bottom of each page of the survey: Previous, Next and Submit. Here you choose the font and the colors of each of them." ) }} </p>
</div></div>
{% endif %}
2026-11-24 22:04:11 +01:00
<div class="row action_hide_on_inherit">
2026-11-29 14:45:57 +01:00
{% set qLastSlot = '' %}
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
{% set fLastSlot = 0 %}
2026-11-24 22:04:11 +01:00
{% for key in aTabKeys %}
{% set attr = aOptionAttributes .optionAttributes [ key ] ? ? null %}
{% if attr is not null %}
2026-11-25 18:22:36 +01:00
{ # Slot-based pane layouts: on a
2026-11-25 13:34:40 +01:00
slot change the previous container is closed and the new one opened.
Every slot is row+col (two divs), except 'logo' (self-contained block)
and 'rest' (normal grid). Computed BEFORE the logo-block branch so
the transition into the logo slot also fires. #}
2026-11-29 11:56:04 +01:00
{% set bFontsPane = tab .category == 'Default font and colors' %}
2026-11-25 13:34:40 +01:00
{% set bTopPane = tab .id == 'top-of-page' %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% set bImagesPane = tab .category == 'Page background' %}
2026-11-27 02:50:06 +01:00
{% set bGroupsPane = tab .id == 'groups' %}
2026-11-29 15:48:26 +01:00
{% set bButtonsPane = tab .category == 'Buttons' %}
2026-11-25 13:34:40 +01:00
{% set fSlot = 'rest' %}
{% if bFontsPane %}
2026-11-29 11:56:04 +01:00
{ # row 174: one row, three col-md-4 columns — col 1 (fc1) =
font/fontsize/fontcolor, col 2 (fc2) = defaultbackgroundcolor,
col 3 (fc3) = the three colors #}
{% if key in aFontsCol1 %} {% set fSlot = 'fc1' %}
{% elseif key in aFontsCol2 %} {% set fSlot = 'fc2' %}
{% elseif key in aFontsCol3 %} {% set fSlot = 'fc3' %}
2026-11-25 13:34:40 +01:00
{% endif %}
{% elseif bTopPane %}
{% if key in aLogoKeys %} {% set fSlot = 'logo' %}
2026-11-26 19:25:22 +01:00
{ # row 136: header row layout — col 1 = font (headerfont) with the
2026-11-26 20:04:33 +01:00
text color in header (navbarfontcolor + custom) stacked below it,
2026-11-26 19:25:22 +01:00
col 2 = header background color (aligned with the color option
via a measured padding-top, see alignHeaderColumns in options.js),
col 3 = sticky. Slots: h1 opens the row + col 1 (further h1 keys
stack in col 1), h2 = col 2, h3 = col 3. #}
{% elseif key == 'headerfont' %} {% set fSlot = 'h1' %}
{% elseif key == 'navbarfontcolor' %} {% set fSlot = 'h1' %}
{% elseif key == 'navbarfontcolorcustom' %} {% set fSlot = 'h1' %}
{% elseif key == 'headerbackgroundcolor' %} {% set fSlot = 'h2' %}
{% elseif key == 'headerbackgroundcolorcustom' %} {% set fSlot = 'h2' %}
feat(theme): default logos left/center/right + 30px top margin + 90px header bar
Row 138: default look of the mother theme:
- brandlogofile default -> ./files/logo-left.png (left)
- centerlogofile default -> ./files/logo.png (center, was "off")
- rightlogofile default -> ./files/logo-right.png (right, was "off")
so all three logos are visible by default
- brand/center/rightlogotopmargin defaults 15 -> 30 (px added in the view)
- new option headerheight (Top of the page tab, col 3 next to the sticky
checkboxes, default 90) applied in custom_header.twig as min-height on
#survey-nav (min-height so taller logos can still grow the bar; the sticky
body padding in scripts/custom.js follows the real nav height)
- sticky defaults were already computer on / tablet on / mobile off (unchanged)
Core normalizes ./files/x on theme reset to image::theme::files/x, so the
config defaults keep the ./files/ style like the existing one. The PNG files
logo-left.png / logo-right.png remain the owner's untracked files (Prompt PL).
Verified: options render tc=633 (headerheight field present, logo dropdowns
list all three files, divs balanced); live survey 282267 with the defaults
applied to the DB row: three logo imgs (logo-left/logo/logo-right),
padding-top 30px on all logo imgs, min-height 90px on #survey-nav, fixed-top
media queries only for computer+tablet (mobile non-sticky) — DB row restored
afterwards; jsdom 7/7; export exit 0. Theme reset needed for the new defaults
to land in the DB. Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:41:12 +01:00
{% elseif key == 'headerheight' %} {% set fSlot = 'h3' %}
2026-11-25 13:34:40 +01:00
{% elseif key in aTopStickyKeys %} {% set fSlot = 'h3' %}
{% elseif key == 'progressbarposition' %} {% set fSlot = 'ppos' %}
2026-11-25 14:23:24 +01:00
{% elseif key == 'progressbarfont' %} {% set fSlot = 'pfont' %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{ # row 135: progress bar colors row — col 1 = progress bar color,
col 2 = progress background, col 3 = progress font color
(custom children share their parent's column) #}
{% elseif key == 'progressbarcolor' %} {% set fSlot = 'pcol1' %}
{% elseif key == 'progressbarcolorcustom' %} {% set fSlot = 'pcol1' %}
{% elseif key == 'progressbarbackgroundcolor' %} {% set fSlot = 'pcol2' %}
{% elseif key == 'progressbarbackgroundcolorcustom' %} {% set fSlot = 'pcol2' %}
2026-11-25 13:34:40 +01:00
{% elseif key == 'progressbarfontcolor' %} {% set fSlot = 'pcol3' %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{% elseif key == 'progressbarfontcolorcustom' %} {% set fSlot = 'pcol3' %}
2026-11-25 13:34:40 +01:00
{% endif %}
2026-11-26 20:57:07 +01:00
{% elseif bImagesPane %}
{ # row 149: Page background pane — col 1 = overall background color
(chooser + custom child) + background image on/off; col 2 = the
three image-detail options #}
feat(options): row 204 — place the last Colors-category options on visible tabs; park open prompts; security review filed
- sliderhandlecolor moved to the Questions category (full-width row at
the end of the Questions pane, after the border section hr);
privacybackgroundcolor moved to Page background (column 1, under the
background image switch). The Colors category is gone entirely; the
options.twig tab loop keeps a Colors exclusion as a safety net.
Both values are still applied in custom_header.twig (verified live).
Variants rebuilt + example config synced; jsdom 8/8.
- Prompt V cleanup verified: no respondage_vanilla folder/zip left in
upload/themes/survey, zero DB references (surveys, template_configuration,
lime_templates). Remaining resets/flushassets are owner actions.
- Security review (Prompt B) executed, approval-gated: report in
SECURITY_REVIEW_20261129.md (S1 HIGH raw option values into <style>/
attributes → stored XSS; S2 MEDIUM raw imagefile option HTML in
options.twig:98-104; S3-S7 info/safe), core FR filed as
FEATURE_REQUEST_security_theme_option_raw_output.md. No fixes without
owner approval.
- Parked prompts moved from prompts.md to OPEN_PROMPTS.md (findable
index): PL, HB, AN, A, C open; Z/B/V marked done. New local files
gitignored + export-excluded (OPEN_PROMPTS.md, SECURITY_REVIEW*.md).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 17:13:40 +01:00
{% if key in [ 'bodybackgroundcolor' , 'bodybackgroundcolorcustom' , 'backgroundimage' , 'privacybackgroundcolor' ] %} {% set fSlot = 'bg1' %}
2026-11-26 20:57:07 +01:00
{% elseif key in [ 'backgroundimagefile' , 'backgroundimagefixed' , 'backgroundimagedisplay' ] %} {% set fSlot = 'bg2' %}
{% endif %}
2026-11-27 02:50:06 +01:00
{% elseif bGroupsPane %}
{ # row 157: Groups pane — TWO columns: col 1 (g1) = group title
options, col 2 (g2) = group description options #}
{% if key in aGroupCol1 %} {% set fSlot = 'g1' %}
{% elseif key in aGroupCol2 %} {% set fSlot = 'g2' %}
{% endif %}
2026-11-29 15:48:26 +01:00
{% elseif bButtonsPane %}
{ # row 191 / plan P6: Buttons pane — bfont = the full-width font
row (buttonsfont), b1/b2/b3 = the Previous/Next/Submit columns #}
{% if key == 'buttonsfont' %} {% set fSlot = 'bfont' %}
{% elseif key in aButtonsCol1 %} {% set fSlot = 'b1' %}
{% elseif key in aButtonsCol2 %} {% set fSlot = 'b2' %}
{% elseif key in aButtonsCol3 %} {% set fSlot = 'b3' %}
{% endif %}
2026-11-25 13:34:40 +01:00
{% endif %}
2026-11-29 15:48:26 +01:00
{% if fSlot != fLastSlot and ( bFontsPane or bTopPane or bImagesPane or bGroupsPane or bButtonsPane ) %}
2026-11-25 13:34:40 +01:00
{% if bFontsPane %}
2026-11-29 11:56:04 +01:00
{ # row 174: column change inside the single fonts row —
close the previous col-md-4, open the next one #}
{% if fLastSlot == 'fc1' or fLastSlot == 'fc2' %} </div><div class="col-md-4">
2026-11-25 14:23:24 +01:00
{% endif %}
2026-11-29 11:56:04 +01:00
{% if fSlot == 'fc1' %} <div class="row action_hide_on_inherit fonts-top-row"><div class="col-md-4">
2026-11-25 13:34:40 +01:00
{% endif %}
2026-11-26 20:57:07 +01:00
{% elseif bTopPane %}
2026-11-25 14:23:24 +01:00
{ # top-of-page transitions: close previous slot, open new slot.
2026-11-26 19:25:22 +01:00
Header (row 136): col 1 = h1 slot (headerfont + navbarfontcolor
stacked), col 2 = h2 slot (header background color), col 3 = h3
(sticky). Progress bar: first row = ppos in col 1, empty col 2,
pfont in col 3; then the colors row (pcol1/pcol2/pcol3). #}
2026-11-25 13:34:40 +01:00
{% if fLastSlot == 'h1' or fLastSlot == 'h2' %} </div><div class="col-md-4">
{% elseif fLastSlot == 'h3' %} </div></div><div class="row action_hide_on_inherit"><div class="col-12"><hr class="top-section-hr"></div></div><div class="row action_hide_on_inherit top-section-intro"><div class="col-12"><h2> {{ gT ( "Logos" ) }} </h2><p> {{ gT ( "In this theme there are three positions for separate logos, but it is up to you which positions you want to fill." ) }} </p></div></div>
{% elseif fLastSlot == 'logo' %} <div class="row action_hide_on_inherit top-section-intro"><div class="col-12"><h2> {{ gT ( "Progress bar" ) }} </h2><p> {{ gT ( "The progress bar can be switched on/off per survey in the survey settings. Here in this section you can choose how the progress bar looks when displayed." ) }} </p></div></div>
2026-11-25 14:23:24 +01:00
{% elseif fLastSlot == 'ppos' %} </div><div class="col-md-4"></div><div class="col-md-4">
{% elseif fLastSlot == 'pfont' %} </div></div><div class="row action_hide_on_inherit progress-colors-row"><div class="col-md-4">
2026-11-25 13:34:40 +01:00
{% elseif fLastSlot == 'pcol1' or fLastSlot == 'pcol2' %} </div><div class="col-md-4">
{% endif %}
{% if fSlot == 'h1' %} <div class="row action_hide_on_inherit top-section-header"><div class="col-md-4">
{% elseif fSlot == 'ppos' %} <div class="row action_hide_on_inherit progress-block"><div class="col-md-4">
{% endif %}
2026-11-26 20:57:07 +01:00
{% elseif bImagesPane %}
2026-11-27 03:40:45 +01:00
{ # 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 %}
2026-11-27 02:50:06 +01:00
{% elseif bGroupsPane %}
{ # row 157: Groups transitions — g1 -> g2 closes col 1 and opens
col 2 (border-start); the first g1 key opens col 1 #}
{% if fLastSlot == 'g1' %} </div><div class="col-md-6 border-start groups-col-2"> {% endif %}
{% if fSlot == 'g1' %} <div class="col-md-6 groups-col-1"> {% endif %}
2026-11-29 15:48:26 +01:00
{% elseif bButtonsPane %}
{ # row 191 / plan P6: Buttons transitions — bfont -> b1 closes the
font row (row+col) and opens the buttons row + col 1 (Previous);
b1 -> b2 -> b3 move to the next col-md-4 with a border-start
divider (row-178 decision 4 style, like the Groups columns) #}
{% if fLastSlot == 'bfont' %} </div></div> {% endif %}
{% if fLastSlot == 'b1' %} </div><div class="col-md-4 border-start buttons-col-2 buttons-col-next"> {% endif %}
{% if fLastSlot == 'b2' %} </div><div class="col-md-4 border-start buttons-col-3 buttons-col-submit"> {% endif %}
{% if fSlot == 'bfont' %} <div class="row action_hide_on_inherit buttons-font-row"><div class="col-12"> {% endif %}
{% if fSlot == 'b1' %} <div class="row action_hide_on_inherit buttons-row"><div class="col-md-4 buttons-col-1 buttons-col-prev"> {% endif %}
2026-11-25 13:34:40 +01:00
{% endif %}
{% set fLastSlot = fSlot %}
{% endif %}
feat(options): logo section as 3 columns (file/margin/per-device) in Top-of-page tab
Prompt M: per logo position (left=brand, center, right) the options page now
shows one column with vertical separators and an <hr> below: file dropdown
with 'No logo' (off) first, top margin as plain number 0-100, and 'Show logo
on' with computer/tablet/mobile checkboxes. New option keys per position:
<pos>logofile, <pos>logotopmargin, <pos>showon{computer,tablet,mobile};
old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, shared
logotopmargin) removed from config.xml. Views map the checkboxes to
Bootstrap display classes per breakpoint and emit per-logo padding-top;
variants/build.php migrates the old json keys to the new ones.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 23:14:10 +01:00
{% if tab .id == 'top-of-page' and key == 'brandlogofile' %}
<div class="col-12">
<div class="row logo-columns">
{% for pos in aLogoPositions %}
{% set fkey = pos ~ 'logofile' %}
{% set mkey = pos ~ 'logotopmargin' %}
{% set fattr = aOptionAttributes .optionAttributes [ fkey ] %}
{% set mattr = aOptionAttributes .optionAttributes [ mkey ] %}
{% set fcv = bGeneralInherit ? 'inherit' : ( aCurrentOptions [ fkey ] is defined ? aCurrentOptions [ fkey ] : ( oParentOptions [ fkey ] is defined ? oParentOptions [ fkey ] : '' ) ) %}
{% set mcv = bGeneralInherit ? 'inherit' : ( aCurrentOptions [ mkey ] is defined ? aCurrentOptions [ mkey ] : ( oParentOptions [ mkey ] is defined ? oParentOptions [ mkey ] : '' ) ) %}
<div class="col-md-4 logo-col- {{ pos }} {% if not loop .first %} border-start {% endif %} ">
{# 1. logo file dropdown, "No logo" (value off) first #}
<div class="mb-3">
<label for="simple_edit_options_ {{ fkey }} " id="lbl_simple_edit_options_ {{ fkey }} " class="form-label"> {{ gT ( fattr .title ) }} </label>
<select class="form-select selector_option_value_field selector_image_selector"
data-inheritvalue=" {{ oParentOptions [ fkey ] }} "
id="simple_edit_options_ {{ fkey }} " name=" {{ fkey }} ">
{% if bInherit %}
<option value="inherit" {% if fcv == 'inherit' %} selected {% endif %} > {{ gT ( "Inherit" ) }} [ {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ fkey ] }} ]</option>
{% endif %}
<option value="off" {% if fcv == 'off' %} selected {% endif %} > {{ gT ( "No logo" ) }} </option>
{{ imageOptions | raw }}
</select>
<button class="btn btn-outline-secondary btn-sm mt-1 selector__open_lightbox" data-bs-target="#simple_edit_options_ {{ fkey }} ">
{{ gT ( "Preview image" ) }}
</button>
</div>
{# 2. margin between logo and top of screen, 0-100 px #}
<div class="mb-3">
<label for="simple_edit_options_ {{ mkey }} " id="lbl_simple_edit_options_ {{ mkey }} " class="form-label"> {{ gT ( mattr .title ) }} </label>
<input type="number" min="0" max="100" step="1"
class="form-control selector-numerical-input selector_text_option_value_field"
{% if mcv != '' and mcv != 'inherit' %} value=" {{ mcv }} " {% endif %}
data-inheritvalue=" {{ oParentOptions [ mkey ] }} "
id="simple_edit_options_ {{ mkey }} " name=" {{ mkey }} "
title=" {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ mkey ] }} "/>
</div>
{# 3. "Show logo on" per device #}
<div class="mb-3">
<span class="form-label d-block"> {{ gT ( "Show logo on" ) }} </span>
{% for dev in [ 'computer' , 'tablet' , 'mobile' ] %}
{% set ckey = pos ~ 'showon' ~ dev %}
{% set cattr = aOptionAttributes .optionAttributes [ ckey ] %}
{% set ccv = bGeneralInherit ? 'inherit' : ( aCurrentOptions [ ckey ] is defined ? aCurrentOptions [ ckey ] : ( oParentOptions [ ckey ] is defined ? oParentOptions [ ckey ] : '' ) ) %}
2026-11-29 14:04:19 +01:00
<div class="form-check mb-1 {% if loop .last %} checkbox-last {% endif %} ">
2026-11-25 13:06:22 +01:00
<input type="checkbox" value="on"
{% if ccv == 'on' %} checked {% endif %}
class="form-check-input selector_option_checkbox_field"
data-inheritvalue=" {{ oParentOptions [ ckey ] }} "
id="simple_edit_options_ {{ ckey }} " name=" {{ ckey }} ">
2026-11-25 21:05:01 +01:00
<label for="simple_edit_options_ {{ ckey }} " id="lbl_simple_edit_options_ {{ ckey }} " class="form-check-label"> {{ gT ( cattr .title ) }} </label>
feat(options): logo section as 3 columns (file/margin/per-device) in Top-of-page tab
Prompt M: per logo position (left=brand, center, right) the options page now
shows one column with vertical separators and an <hr> below: file dropdown
with 'No logo' (off) first, top margin as plain number 0-100, and 'Show logo
on' with computer/tablet/mobile checkboxes. New option keys per position:
<pos>logofile, <pos>logotopmargin, <pos>showon{computer,tablet,mobile};
old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, shared
logotopmargin) removed from config.xml. Views map the checkboxes to
Bootstrap display classes per breakpoint and emit per-logo padding-top;
variants/build.php migrates the old json keys to the new ones.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 23:14:10 +01:00
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<div class="row action_hide_on_inherit"><div class="col-12"><hr class="logo-columns-hr"></div></div>
feat(options): upload-a-file facility also under the logos row of Top of the page
Row 139: the "Upload an image" widget is no longer tied to the Images tab —
a new row with a single element (the upload control + progress bar) is
rendered directly under the logos row of the "Top of the page" tab, with its
own ids (#upload_image_frontend_top / #upload_progress_frontend_top).
options.js binds a second BindUpload instance on the same shared
#upload_frontend form for those ids, so both widgets upload and both feed
addUploadedImageToSelectors (a fresh upload becomes selectable in the image
dropdowns immediately). The original Images-tab widget is unchanged.
OPTIONS_JS_TOKEN -> 20261126.16. Verified: render tc=648 (new ids exactly
once, original id once, widget sits after logo-columns-hr, divs 324/324,
options.js?v=20261126.16), jsdom 7/7 incl. new pins (id uniqueness, position
under the logos row, change handler bound on BOTH file inputs), export
exit 0. Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:46:18 +01:00
{ # row 139: a new row directly under the logos row, with just one
element: the file-upload facility (same widget as in the Images
tab, but with its own ids so both work — options.js binds a
BindUpload per input/progress pair on the shared #upload_frontend
form). The actual upload form is rendered by themeOptions/update.php #}
<div class="row action_hide_on_inherit upload-file-row">
<div class="col-12">
<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_top"> {{ sprintf ( gT ( "Upload an image (maximum size: %d MB):" ) , templateConfiguration .maxFileSize / 1 0 2 4 / 1 0 2 4 ) }} </label>
</div>
<div class="col-12">
<span id="fileselector_frontend_top">
<label class="btn btn-outline-secondary" for="upload_image_frontend_top" role="button" tabindex="0">
<input class="d-none" id="upload_image_frontend_top" name="upload_image_frontend_top" 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_top" 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>
2026-11-26 19:58:19 +01:00
{ # row 140/141: translatable help text under the upload option,
depending on where this page is shown: bInherit is true on
survey / survey-group level, false on the global page #}
2026-11-26 19:49:47 +01:00
<div class="row">
<div class="col-12">
2026-11-26 19:58:19 +01:00
<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>
2026-11-26 19:49:47 +01:00
</div>
</div>
feat(options): upload-a-file facility also under the logos row of Top of the page
Row 139: the "Upload an image" widget is no longer tied to the Images tab —
a new row with a single element (the upload control + progress bar) is
rendered directly under the logos row of the "Top of the page" tab, with its
own ids (#upload_image_frontend_top / #upload_progress_frontend_top).
options.js binds a second BindUpload instance on the same shared
#upload_frontend form for those ids, so both widgets upload and both feed
addUploadedImageToSelectors (a fresh upload becomes selectable in the image
dropdowns immediately). The original Images-tab widget is unchanged.
OPTIONS_JS_TOKEN -> 20261126.16. Verified: render tc=648 (new ids exactly
once, original id once, widget sits after logo-columns-hr, divs 324/324,
options.js?v=20261126.16), jsdom 7/7 incl. new pins (id uniqueness, position
under the logos row, change handler bound on BOTH file inputs), export
exit 0. Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:46:18 +01:00
</div>
</div>
</div>
feat(options): logo section as 3 columns (file/margin/per-device) in Top-of-page tab
Prompt M: per logo position (left=brand, center, right) the options page now
shows one column with vertical separators and an <hr> below: file dropdown
with 'No logo' (off) first, top margin as plain number 0-100, and 'Show logo
on' with computer/tablet/mobile checkboxes. New option keys per position:
<pos>logofile, <pos>logotopmargin, <pos>showon{computer,tablet,mobile};
old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, shared
logotopmargin) removed from config.xml. Views map the checkboxes to
Bootstrap display classes per breakpoint and emit per-logo padding-top;
variants/build.php migrates the old json keys to the new ones.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 23:14:10 +01:00
</div>
{% elseif key not in aLogoKeys %}
2026-11-25 11:35:18 +01:00
{% set bQuestionsPane = tab .category == 'Questions' %}
{% if bQuestionsPane %}
2026-11-29 14:45:57 +01:00
{ # row 178 plan: slot "section:colIndex" from aQSlots, legacy
columns as "legacy:N", full-width rest as "rest". On a
section change: close the column (+ section row), emit the
full-width hr after the finished section, then the new h3
and section row. border-start only between columns of the
same section/legacy grid #}
{% set qSlot = aQSlots [ key ] ? ? ( key in aQuestionsCol1 ? 'legacy:1' : ( key in aQuestionsCol2 ? 'legacy:2' : ( key in aQuestionsCol3 ? 'legacy:3' : 'rest' ) ) ) %}
{% if qSlot != qLastSlot %}
{% set qSec = qSlot | split ( ':' ) [ 0 ] %} {% set qCi = qSlot | split ( ':' ) [ 1 ] %}
{% set lSec = qLastSlot | split ( ':' ) [ 0 ] %} {% set lCi = qLastSlot | split ( ':' ) [ 1 ] %}
{% if qLastSlot != '' and qLastSlot != 'rest' %} </div> {% endif %}
{% if qSec != lSec %}
{% if lSec != '' and lSec != 'rest' and lSec != 'legacy' %} </div> {% endif %}
{% if lSec != '' and lSec != 'rest' and lSec != 'legacy' %} <div class="row action_hide_on_inherit"><div class="col-12"><hr class="questions-section-hr"></div></div> {% endif %}
{% if qSec != 'rest' and qSec != 'legacy' %}
{% set qSecDef = null %} {% for s in aQSections %} {% if s .id == qSec %} {% set qSecDef = s %} {% endif %} {% endfor %}
<div class="row action_hide_on_inherit questions-section-intro"><div class="col-12"><h3> {{ gT ( qSecDef .h3 ) }} </h3></div></div>
<div class="row action_hide_on_inherit questions-section questions-section- {{ qSec }} ">
{% endif %}
2026-11-25 14:23:24 +01:00
{% endif %}
2026-11-29 14:45:57 +01:00
{% if qSec != 'rest' %}
{% if qSec == 'legacy' %} {% set qColClass = 'col-md-4' %} {% else %} {% set qSecDef = null %} {% for s in aQSections %} {% if s .id == qSec %} {% set qSecDef = s %} {% endif %} {% endfor %} {% set qColClass = qSecDef .colClass %} {% endif %}
<div class=" {{ qColClass }} {% if qSec == lSec and qCi != '0' %} border-start {% endif %} {% if qSec == 'legacy' and lSec == 'legacy' and lCi != '0' %} border-start {% endif %} questions-col- {{ qSec }} - {{ qCi }} ">
{% endif %}
{% set qLastSlot = qSlot %}
2026-11-25 11:35:18 +01:00
{% endif %}
{% endif %}
2026-11-27 03:40:45 +01:00
{ # 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. #}
2026-11-29 15:48:26 +01:00
{% if bQuestionsPane or bTopPane or bGroupsPane or bImagesPane or bButtonsPane or ( bFontsPane and fSlot != 'rest' ) %} {% set wrapClass = 'col-12' %} {% else %} {% set wrapClass = 'col-12 col-md-' ~ attr .width | default ( 2 ) %} {% endif %}
2026-11-29 15:26:36 +01:00
{ # row 188 / plan P5: inside the "Question border" section's radius
subcolumn the four radius options form two rows of two — their
2026-11-29 16:05:39 +01:00
wrappers are half the column (col-md-6) instead of col-12.
2026-11-29 16:51:09 +01:00
Row 200: NO vertical divider between the two radius subcolumns
(border-start removed — adds nothing) #}
{% if bQuestionsPane and key starts with 'questionborderradius' %} {% set wrapClass = 'col-12 col-md-6' %} {% endif %}
2026-11-24 22:04:11 +01:00
{# 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 ] : '' ) ) %}
2026-11-25 11:35:18 +01:00
{ # parent != '': this field is only visible when the parent option's value
2026-11-25 18:22:36 +01:00
is one of the show-values (default "on"; see aShowIfValues). options.js toggles
2026-11-25 11:35:18 +01:00
.option-visibility via data-show-if-parent/data-show-if-value;
2026-11-24 22:04:11 +01:00
the field itself is additionally disabled via data-parent/selector_radio_childfield #}
2026-11-25 18:22:36 +01:00
{ # server-side INITIAL visibility — when the parent is a buttons group
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
or a dropdown (e.g. <el>textcolorcustom with parent <el>textcolor,
show-value "other"), add d-none at render time unless the parent's
current value is IN the show-value list. Same source of truth as
currentValue (stored options JSON, fallback oParentOptions). options.js
2026-11-25 11:35:18 +01:00
updateVisibilityByParent() toggles the same class on change (idempotent
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
with this initial state). #}
2026-11-25 08:46:34 +01:00
{% set bParentHidden = false %}
2026-11-25 11:35:18 +01:00
{% set showIfValues = 'on' %}
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
{% if attr .parent != '' and attr .parent != key %}
2026-11-25 08:46:34 +01:00
{% set parentAttr = aOptionAttributes .optionAttributes [ attr .parent ] ? ? null %}
2026-11-25 11:35:18 +01:00
{% set showIfValues = aShowIfValues [ attr .parent ] ? ? 'on' %}
feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers
(+custom children), both default mode 'default' (Default font color);
resolved via cmm.cm() in custom_header.twig (legacy hex passthrough)
- border radii show only for questionborder=box (per-key show-values in
options.twig aShowIfValuesByKey); options.js cascades hiding to nested
conditional wrappers (questionbordercolorcustom); radii stay two
subcolumns (border-start on TR/BR)
- chooser columns aligned with the font color: title section = one column
(title-0: font, font color, size/options, legacy picker, title bg, body
bg), answers-0 += checkbox chooser, help-0 = font + font color + bg
chooser, help-1 = text position
- all font-color labels follow 'Font color for ...' / 'Custom font color
for ...' (21 labels renamed, incl. 'Font color for question titles' and
'Font color for answers and subquestions')
- chooser key lists synced in options.twig/options.js/build.php (+2)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-29 16:30:39 +01:00
{# row 197: per-key override wins (border radii = "box" only) #}
{% if aShowIfValuesByKey [ key ] is defined %} {% set showIfValues = aShowIfValuesByKey [ key ] %} {% endif %}
feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout:
top row (col 1: font, fontcolor, fontsize; col 2: primarycolor +
new secondarycolor; col 3 empty), an hr, then one combo row per element
(header, progressbar, questiontitle, answers, grouptitle,
groupdescription, buttons) with col 1 = existing <el>font fontselect,
col 2 = new <el>textcolor dropdown (default|primary|secondary|other),
col 3 = new <el>textcolorcustom colorpicker, visible only when mode is
'other' (parent show-value via aShowIfValues, server-side initial d-none,
options.js updateVisibilityByParent/updateChild now handle select parents,
multi-value aware; font's self-parent removed from config.xml).
config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled
'Default font color (body text)' / 'Primary color'), secondarycolor added
(default #888888), 14 per-element color keys added with dropdownoptions.
Views emit the per-element color as inline style (default->fontcolor,
primary->primarycolor, secondary->secondarycolor, other->custom picker).
Colors tab now only holds sliderhandlecolor + privacybackgroundcolor
(final Colors layout = Prompt T, still open).
Variants rebuilt (defensie, erasmus, example respondage_respondage) —
no unknown-key failures; theme reset in LS-admin still owner action.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-25 11:51:57 +01:00
{% if parentAttr is not null and ( parentAttr .type == 'buttons' or parentAttr .type == 'dropdown' ) %}
2026-11-25 08:46:34 +01:00
{% set parentValue = bGeneralInherit ? 'inherit' : ( aCurrentOptions [ attr .parent ] is defined ? aCurrentOptions [ attr .parent ] : ( oParentOptions [ attr .parent ] is defined ? oParentOptions [ attr .parent ] : '' ) ) %}
2026-11-25 11:35:18 +01:00
{% if parentValue not in showIfValues | split ( '|' ) %} {% set bParentHidden = true %} {% endif %}
2026-11-25 08:46:34 +01:00
{% endif %}
{% endif %}
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
{ # 'disable' mode (aShowIfMode): the child stays visible but is rendered
disabled server-side; options.js keeps toggling only disabled (never
d-none) for these wrappers, and data-keep-value makes the serializer
keep the stored child value instead of resetting it to inherit/false #}
{% set bDisableMode = attr .parent != '' and ( aShowIfMode [ attr .parent ] ? ? 'hide' ) == 'disable' %}
{% set bChildDisabled = bParentHidden and bDisableMode %}
2026-11-26 20:57:07 +01:00
{ # row 149: horizontal line inside column 1 of the Page background pane,
between the overall background color and the background image switch #}
{% if bImagesPane and key == 'backgroundimage' %} <div class="col-12"><hr class="images-col1-hr"></div> {% endif %}
2026-11-29 15:26:36 +01:00
{ # row 188 / plan P5 (row-178 decision 4): horizontal line between the
two radius rows inside the border section's radius subcolumn —
emitted right before the bottom-left radius (full column width) #}
{% if bQuestionsPane and key == 'questionborderradiusBL' %} <div class="col-12"><hr class="questions-border-radius-hr"></div> {% endif %}
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
<div class=" {{ wrapClass }} {% if attr .parent != '' %} option-visibility {% if bParentHidden and not bDisableMode %} d-none {% endif %} {% endif %} "
{% if attr .parent != '' %} data-show-if-parent=" {{ attr .parent }} " data-show-if-value=" {{ showIfValues }} " {% if bDisableMode %} data-show-if-mode="disable" {% endif %} {% endif %} >
2026-11-29 13:10:28 +01:00
{ # row 176: checkbox options get NO mb-3 wrapper margin — the
.form-check itself carries mb-1 (same as the "Show logo on"
checkboxes in the Logos row), so checkbox groups are equally
compact everywhere #}
<div {% if attr .type != 'checkbox' %} class="mb-3" {% endif %} >
2026-11-25 21:05:01 +01:00
{ # label ALWAYS above the control, for every option type EXCEPT checkbox
(checkboxes carry their label to the RIGHT of the box, rendered in
the checkbox branch below). d-block so the label gets its own line
even next to an inline-flex control (btn-group buttons). #}
{% if attr .type != 'checkbox' %}
<label for="simple_edit_options_ {{ key }} " id="lbl_simple_edit_options_ {{ key }} " class="form-label d-block"> {{ gT ( attr .title ) }} </label>
{% endif %}
2026-06-17 10:06:07 +02:00
2026-11-24 23:03:57 +01:00
{% if key == 'headersticky' %}
{% elseif attr .type == 'buttons' %}
2026-11-24 22:04:11 +01:00
{# buttons type: one radio per value of options="a|b", labels from optionlabels="A|B" #}
{% set optValues = attr .options | split ( '|' ) %}
{% set optLabels = attr .optionlabels | split ( '|' ) %}
<div class="btn-group" role="group" data-bs-toggle="buttons">
{% for optValue in optValues %}
<input id=" {{ key }} _ {{ optValue }} " type="radio" name=" {{ key }} " value=" {{ optValue }} "
{% if currentValue == optValue %} checked {% endif %}
2026-11-25 11:35:18 +01:00
class="btn-check selector_option_radio_field simple_edit_options_ {{ key }} {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %} />
2026-11-26 20:21:33 +01:00
{ # row 144: a newline in an option label ( in config.xml survives
XML attribute normalization) renders as a <br>. Split the RAW
label first: gT() html-escapes a newline to , which would
make the split a no-op. Each part is then gT()'d (html-escaped)
separately, so no raw HTML from translations #}
<label for=" {{ key }} _ {{ optValue }} " class="btn btn-outline-secondary {% if currentValue == optValue %} active {% endif %} "> {% set lblParts = ( optLabels [ loop .index0 ] | default ( optValue ) ) | split ( "\n" ) %} {% for lp in lblParts %} {% if not loop .first %} <br> {% endif %} {{ gT ( lp ) }} {% endfor %} </label>
2026-11-24 22:04:11 +01:00
{% endfor %}
{% if bInherit %}
<input id=" {{ key }} _inherit" type="radio" name=" {{ key }} " value="inherit"
{% if currentValue == 'inherit' %} checked {% endif %}
2026-11-25 11:35:18 +01:00
class="btn-check selector_option_radio_field simple_edit_options_ {{ key }} {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %} />
2026-11-24 22:04:11 +01:00
<label for=" {{ key }} _inherit" class="btn btn-outline-secondary {% if currentValue == 'inherit' %} active {% endif %} "> {{ gT ( "Inherit" ) }} [ {{ oParentOptions [ key ] }} ]</label>
2026-06-17 10:06:07 +02:00
{% endif %}
2026-11-24 22:04:11 +01:00
</div>
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{% elseif attr .type == 'checkbox' %}
2026-11-25 21:05:01 +01:00
{ # checkbox: checked = "on", unchecked = "off". The box comes BEFORE
its label (classic .form-check, label to the right of the box); the
label keeps the same id (lbl_simple_edit_options_<key>) so tests/JS
anchors keep working. With survey-level inherit, an untouched box
keeps the value "inherit" (options.js: data was-inherit). Children
2026-11-29 13:10:28 +01:00
of a parent switch get selector_radio_childfield + data-parent.
Row 176: mb-1 on the .form-check (exactly like the "Show logo on"
boxes in the Logos row) — the distance between the checkbox rows
2026-11-29 14:04:19 +01:00
is then the same in every row of the page. Row 177: the LAST
checkbox of a run also gets .checkbox-last (margin-bottom 15px)
for the gap to the following item. #}
<div class="form-check mb-1 {% if key in aLastCheckboxKeys %} checkbox-last {% endif %} ">
2026-11-25 21:05:01 +01:00
<input type="checkbox" value="on"
{% if currentValue == 'on' %} checked {% endif %}
class="form-check-input selector_option_checkbox_field {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
data-inheritvalue=" {{ oParentOptions [ key ] }} "
id="simple_edit_options_ {{ key }} " name=" {{ key }} ">
<label for="simple_edit_options_ {{ key }} " id="lbl_simple_edit_options_ {{ key }} " class="form-check-label"> {{ gT ( attr .title ) }} </label>
</div>
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{% elseif attr .type == 'dropdown' %}
{% set ddClasses = 'form-select selector_option_value_field' %}
{% if attr .parent != '' %} {% set ddClasses = ddClasses ~ ' selector_radio_childfield' %} {% endif %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% if tab .category == 'Page background' %} {% set ddClasses = ddClasses ~ ' selector_image_selector' %} {% endif %}
2026-11-24 22:04:11 +01:00
{% if key == 'font' %} {% set ddClasses = ddClasses ~ ' selector_fontselect' %} {% endif %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{% if key in aColorChooserKeys %} {% set ddClasses = ddClasses ~ ' selector_color_mode' %} {% endif %}
2026-11-24 22:04:11 +01:00
<select class=" {{ ddClasses }} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
data-inheritvalue=" {{ oParentOptions [ key ] }} "
id="simple_edit_options_ {{ key }} " name=" {{ key }} ">
{% if bInherit %}
<option value="inherit" {% if currentValue == 'inherit' %} selected {% endif %} > {{ gT ( "Inherit" ) }} [ {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ key ] }} ]</option>
2026-06-17 10:06:07 +02:00
{% endif %}
2026-11-24 22:04:11 +01:00
{{ attr .dropdownoptions | raw }}
</select>
{% elseif attr .type == 'fontselect' %}
{ # fontselect (per-element font override): the SAME font choices as the
base "font" dropdown — the optgroups are shared, so bundled and
variant-custom fonts appear here automatically — plus a first option
"Same as base font" (value "base": the views then put no extra class
on the element, it inherits the body font). options.js collects the
packages of ALL .selector_fontselect selects into packages_to_load. #}
{% set fontAttr = aOptionAttributes .optionAttributes [ 'font' ] ? ? null %}
<select class="form-select selector_option_value_field selector_fontselect {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
data-inheritvalue=" {{ oParentOptions [ key ] }} "
id="simple_edit_options_ {{ key }} " name=" {{ key }} ">
{% if bInherit %}
<option value="inherit" {% if currentValue == 'inherit' %} selected {% endif %} > {{ gT ( "Inherit" ) }} [ {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ key ] }} ]</option>
2026-06-17 10:06:07 +02:00
{% endif %}
2026-11-24 22:04:11 +01:00
<option value="base" {% if currentValue == 'base' %} selected {% endif %} > {{ gT ( "Same as base font" ) }} [ {{ oParentOptions [ 'font' ] | default ( '' ) }} ]</option>
{{ fontAttr ? fontAttr .dropdownoptions | raw : '' }}
</select>
{% elseif attr .type == 'imagefile' %}
<select class="form-select selector_option_value_field selector_image_selector {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
data-inheritvalue=" {{ oParentOptions [ key ] }} "
id="simple_edit_options_ {{ key }} " name=" {{ key }} ">
{% if bInherit %}
<option value="inherit" {% if currentValue == 'inherit' %} selected {% endif %} > {{ gT ( "Inherit" ) }} [ {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ key ] }} ]</option>
{% endif %}
{{ imageOptions | raw }}
</select>
<button class="btn btn-outline-secondary btn-sm mt-1 selector__open_lightbox" data-bs-target="#simple_edit_options_ {{ key }} ">
{{ gT ( "Preview image" ) }}
</button>
{% elseif attr .type == 'colorpicker' %}
<div class="input-group">
<div class="input-group-text style__colorpicker">
<input type="color" name=" {{ key }} _picker" data-value=" {{ oParentOptions [ key ] }} "
{% if currentValue matches '/^#[0-9a-fA-F]{3,8}$/' %} value=" {{ currentValue }} " {% endif %}
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
{% if bChildDisabled %} disabled aria-disabled="true" {% endif %}
2026-11-26 14:15:09 +01:00
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
class="selector__colorpicker-inherit-value {% if attr .parent != '' %} selector_radio_childfield {% endif %} "/>
2026-11-24 22:04:11 +01:00
</div>
<input type="text" name=" {{ key }} " data-inheritvalue=" {{ oParentOptions [ key ] }} "
value=" {% if currentValue != '' and currentValue != 'inherit' %} {{ currentValue }} {% endif %} "
{% if bInherit %} placeholder=" {{ gT ( "Inherit" ) }} [ {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ key ] }} ]" {% endif %}
2026-11-25 11:35:18 +01:00
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
feat(options): menu item color as preset dropdown with persistent custom color (working example)
navbarfontcolor (Top of the page tab, column 2) changes from a plain
colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 |
Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but
grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its
value across saves (data-keep-value) so switching back to 'Other' restores the
last picked color. Dropdown option labels show the live hex of each preset and
clickable swatch chips select a preset; an effective-color swatch next to the
picker shows the color actually applied. A legacy stored hex is migrated to
mode 'other' + custom field (options.js) and accepted directly in
custom_header.twig, so nothing is lost before a theme reset. Views map
default->fontcolor, color1/2/3->primary/secondary/tertiarycolor,
other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay
plain colorpickers, default #ffffff. build.php maps a legacy hex
navbarfontcolor in variant jsons to other+custom for when variants are built.
Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration,
gray-out, keep-value on save, chips, swatches), live survey render for all 5
modes, export check exit 0.
NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no
customer is waiting; the on-disk variant folders were left at their
pre-feature state and no variant theme was reset. Run
variants/build.php per variant only after the open prompts are done.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
{% if bChildDisabled %} disabled aria-disabled="true" {% endif %}
{% if bDisableMode %} data-keep-value="1" {% endif %}
2026-11-24 22:04:11 +01:00
id="simple_edit_options_ {{ key }} "
2026-11-25 11:35:18 +01:00
class="selector_option_value_field selector__color-picker form-control simple_edit_options_ {{ key }} {% if attr .parent != '' %} selector_radio_childfield {% endif %} "/>
2026-11-24 22:04:11 +01:00
{% if bInherit %}
<div class="input-group-text">
<button class="btn btn-outline-secondary btn-xs selector__reset-colorfield-to-inherit"><i class="ri-refresh-line"></i></button>
</div>
{% endif %}
</div>
{% elseif attr .type == 'duration' %}
<input type="text"
class="form-control selector-numerical-input selector_text_option_value_field {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
{% if currentValue != '' and currentValue != 'inherit' %} value=" {{ currentValue }} " {% endif %}
id="simple_edit_options_ {{ key }} " name=" {{ key }} "
title=" {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ key ] }} "/>
{% elseif attr .type == 'text' %}
<input type="text"
class="form-control selector-text-input selector_text_option_value_field {% if attr .parent != '' %} selector_radio_childfield {% endif %} "
{% if attr .parent != '' %} data-parent=" {{ attr .parent }} " {% endif %}
{% if currentValue != '' and currentValue != 'inherit' %} value=" {{ currentValue }} " {% endif %}
id="simple_edit_options_ {{ key }} " name=" {{ key }} "
title=" {{ gT ( "Inherited value:" ) }} {{ oParentOptions [ key ] }} "/>
{% endif %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135)
The experimental color-chooser (mode dropdown + swatch chips + custom picker,
previously only navbarfontcolor) now also covers, with the owner-specified
defaults:
- headerbackgroundcolor — default "Default background color" (slot h1)
- progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1
- progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color
- progressbarfontcolor — column 3, default Default font color, with an extra tip
underneath: "Make this font color the same color as the color of the progress
bar when you do not want to see the progress in %."
Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3|
other) whose own default carries data-default="1" + [ ] in config.xml, plus a
<key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js
generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with
shared presets, one delegated change handler for select.selector_color_mode, and
per-key legacy hex migration (stored hex -> mode "other" + hex into the custom
child). custom_header.twig resolves the modes via a local cm() macro (import
_self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates
legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN ->
20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default,
progress row col order, tip present, divs balanced, options.js?v=20261126.14),
jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration,
chips, layout, tip) and the navbar test re-scoped to its own chips; live survey
282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor
-> #ffffff; DB row restored); export exit 0; build.php lints. Variants not
rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{ # row 135: extra tip underneath the whole "Progress bar font color"
option (attached to its custom child, which renders last in the
same column, so the tip sits at the bottom of the option) #}
{% if key == 'progressbarfontcolorcustom' %}
<div class="form-text mt-1"> {{ gT ( "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." ) }} </div>
{% endif %}
2026-06-17 10:06:07 +02:00
</div>
</div>
2026-11-25 13:34:40 +01:00
feat(options): logo section as 3 columns (file/margin/per-device) in Top-of-page tab
Prompt M: per logo position (left=brand, center, right) the options page now
shows one column with vertical separators and an <hr> below: file dropdown
with 'No logo' (off) first, top margin as plain number 0-100, and 'Show logo
on' with computer/tablet/mobile checkboxes. New option keys per position:
<pos>logofile, <pos>logotopmargin, <pos>showon{computer,tablet,mobile};
old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, shared
logotopmargin) removed from config.xml. Views map the checkboxes to
Bootstrap display classes per breakpoint and emit per-logo padding-top;
variants/build.php migrates the old json keys to the new ones.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 23:14:10 +01:00
{% endif %}
2026-11-24 22:04:11 +01:00
{% endif %}
{% endfor %}
refactor(options): config.xml categories now equal the options.twig tab labels
Row 159. When the options page falls back to the core renderer
(optionspage=core), options are grouped by their config.xml category — so
each category must be the tab it lives in under the custom options.twig:
group keys -> 'Groups', top-of-page keys (logos, header/navbar/progress
colors, progress position, sticky, height) -> 'Top of the page',
background keys -> 'Page background', font/color keys -> 'Default fonts and
colors', the former 'Simple options' -> 'Other options'. Tab ids are kept,
so stored tab preferences stay valid. 'Colors' remains for
sliderhandlecolor/privacybackgroundcolor (no custom tab yet, Prompt T).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-27 03:07:30 +01:00
{% if tab .category == 'Page background' %}
2026-11-27 03:40:45 +01:00
{ # 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.
2026-11-26 21:03:32 +01:00
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 / 1 0 2 4 / 1 0 2 4 ) }} </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
2026-11-27 03:17:57 +01:00
widget in the Header tab (rows 140/141) #}
2026-11-26 21:03:32 +01:00
<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>
2026-11-27 03:40:45 +01:00
</div>
2026-11-26 21:03:32 +01:00
{% elseif fLastSlot == 'bg1' %} </div>
{% endif %}
2026-11-26 20:57:07 +01:00
{% endif %}
2026-11-29 14:45:57 +01:00
{% if tab .category == 'Questions' and qLastSlot != '' and qLastSlot != 'rest' %}
{% set lSecEnd = qLastSlot | split ( ':' ) [ 0 ] %}
{% if lSecEnd != 'legacy' %} </div></div> {% else %} </div> {% endif %}
{% endif %}
2026-11-27 02:50:06 +01:00
{ # row 157: close the open Groups column (each groups slot opens exactly
one div: the col-md-6) #}
{% if tab .id == 'groups' and fLastSlot in [ 'g1' , 'g2' ] %} </div> {% endif %}
2026-11-29 15:48:26 +01:00
{ # row 191 / plan P6: close the open Buttons slot (bfont opened row+col-12,
b1/b2/b3 opened one col inside the buttons row — both close two divs) #}
{% if tab .category == 'Buttons' and fLastSlot in [ 'bfont' , 'b1' , 'b2' , 'b3' ] %} </div></div> {% endif %}
2026-11-25 13:34:40 +01:00
{ # 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) #}
2026-11-29 11:56:04 +01:00
{% if ( tab .category == 'Default font and colors' or tab .id == 'top-of-page' ) and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %} </div></div> {% endif %}
2026-11-24 22:04:11 +01:00
</div>
2026-06-17 10:06:07 +02:00
2026-11-26 21:03:32 +01:00
{ # 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 #}
2026-06-17 10:06:07 +02:00
2026-11-24 22:04:11 +01:00
{ # Footer at the bottom of every tab: "Proudly developed by [Respondage logo]",
linking to https://www.respondage.nl #}
{% if respondageLogo %}
<div class="row action_hide_on_inherit respondage-footer">
<div class="col-12 text-center mt-4 pt-3 border-top">
<a href="https://www.respondage.nl" target="_blank" rel="noopener noreferrer">
{{ gT ( "Proudly developed by" ) }}
<img src=" {{ respondageLogo }} " alt="Respondage" style="max-height: 24px; width: auto; vertical-align: middle;">
</a>
2026-06-17 10:06:07 +02:00
</div>
</div>
2026-11-24 22:04:11 +01:00
{% endif %}
2026-06-17 10:06:07 +02:00
</div>
2026-11-24 22:04:11 +01:00
{% endfor %}
2026-06-17 10:06:07 +02:00
</div>
2026-11-25 18:22:36 +01:00
{ # HOIST TABS: with optionspage=custom, core renders this whole page inside
fix(options): hoist category tabs to the top-level tab bar (Prompt D)
With optionspage=custom, core renders the custom options page inside a
single outer "Simple options" tab (#simple). A new inline script
(respondage-hoist-tabs, POS_END) moves our tab buttons into the outer
ul#theme-options-tabs, our panes into the outer .tab-content and the
spinner/inherit row above the tab bar, then drops the #simple wrapper and
the outer "Simple options" li; the first tab (Fonts) becomes the active
top-level tab and the debug "Advanced options" tab stays last.
Bootstrap 5 tabs use delegated click handlers, so moved buttons keep
working. No core changes, no config.xml change, no OPTIONS_JS_TOKEN bump
(options.js untouched). Verified via jsdom full-page fixture (global +
survey/inherit): flat tab bar, panes in outer tab-content, tab clicking
works, 63 option wrappers intact, radio groups still idempotent.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-24 22:40:52 +01:00
one outer "Simple options" tab (ul#theme-options-tabs > li > #simple). Move our tab
buttons into the outer tab bar, our panes into the outer .tab-content and everything
else (spinner, inherit row, hr) above the outer tab bar, then drop the #simple
wrapper — so our category tabs sit at the SAME level as the outer bar.
Inline (rendered into the page HTML, so it runs on every fresh page load even with a
heuristically cached options.js; idempotent). Bootstrap 5 tabs use delegated click
handlers on document, so the moved buttons keep working without re-init. #}
{{ registerScript ( 'respondage-hoist-tabs' , "(function(){function hoist(){var outer=document.getElementById('theme-options-tabs');var simple=document.getElementById('simple');if(!outer||!simple){return;}var innerNav=null,innerContent=null,i;var kids=Array.prototype.slice.call(simple.children);for(i=0;i<kids.length;i++){if(kids[i].classList.contains('nav-tabs')){innerNav=kids[i];}else if(kids[i].classList.contains('tab-content')){innerContent=kids[i];}}if(!innerNav||!innerContent){return;}var outerContent=simple.parentNode;var refLi=null;var btns=outer.querySelectorAll('button[data-bs-toggle=\"tab\"]');for(i=0;i<btns.length;i++){if(btns[i].getAttribute('data-bs-target')==='#advanced'){refLi=btns[i].closest('li');}}var lis=innerNav.querySelectorAll('li');for(i=0;i<lis.length;i++){if(refLi){outer.insertBefore(lis[i],refLi);}else{outer.appendChild(lis[i]);}}btns=outer.querySelectorAll('button[data-bs-toggle=\"tab\"]');for(i=0;i<btns.length;i++){if(btns[i].getAttribute('data-bs-target')==='#simple'){var li=btns[i].closest('li');if(li&&li.parentNode){li.parentNode.removeChild(li);}}}var panes=Array.prototype.slice.call(innerContent.children);for(i=0;i<panes.length;i++){outerContent.appendChild(panes[i]);}var rest=Array.prototype.slice.call(simple.children);for(i=0;i<rest.length;i++){if(rest[i]!==innerNav&&rest[i]!==innerContent){outer.parentNode.insertBefore(rest[i],outer);}}if(simple.parentNode){simple.parentNode.removeChild(simple);}btns=outer.querySelectorAll('button[data-bs-toggle=\"tab\"]');for(i=0;i<btns.length;i++){btns[i].classList.remove('active');btns[i].setAttribute('aria-selected','false');}if(btns.length){btns[0].classList.add('active');btns[0].setAttribute('aria-selected','true');}}if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',hoist);}else{hoist();}})();" , 'POS_END' ) }}
2026-11-24 22:04:11 +01:00
{# Lightbox modal for the image preview buttons #}
2026-06-17 10:06:07 +02:00
<div class="modal fade" tabindex="-1" role="dialog" id="lightbox-modal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
2026-11-24 22:04:11 +01:00
<h2 class="modal-title selector__title h5"></h2>
2026-06-17 10:06:07 +02:00
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
2026-11-24 22:04:11 +01:00
<div class="row">
<div class="col-12">
<img class="selector__image img-fluid" src="" alt="title"/>
2026-06-17 10:06:07 +02:00
</div>
</div>
</div>
</div>
</div>
</div>