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>
This commit is contained in:
Tammo ter Hark 2026-11-27 03:07:30 +01:00
commit cbcf3c75bd
2 changed files with 112 additions and 108 deletions

View file

@ -88,19 +88,19 @@
the json; build.php checks that the key exists.
-->
<options>
<!-- Prompt O: the five "Simple options" are width=12, so they stack in ONE
column (full-width rows) in the Simple options tab, label above each
<!-- Prompt O: the five "Other options" are width=12, so they stack in ONE
column (full-width rows) in the Other options tab, label above each
control (Prompt G). -->
<hideprivacyinfo type="buttons" category="Simple options" width="12" title="Hide privacy info" options="on|off" optionlabels="Yes|No">off</hideprivacyinfo>
<container type="buttons" category="Simple options" width="12" title="Survey container" options="on|off" optionlabels="Yes|No">on</container>
<showpopups type="buttons" category="Simple options" width="12" title="Show popups" options="1|0|-1" optionlabels="Popup|On page|No">1</showpopups>
<showclearall type="buttons" category="Simple options" width="12" title="Show Clear All button" options="on|off" optionlabels="Yes|No">off</showclearall>
<fixnumauto type="buttons" category="Simple options" width="12" title="Fix automatically numeric value" options="enable|partial|disable" optionlabels="Yes|For expression|No">enable</fixnumauto>
<hideprivacyinfo type="buttons" category="Other options" width="12" title="Hide privacy info" options="on|off" optionlabels="Yes|No">off</hideprivacyinfo>
<container type="buttons" category="Other options" width="12" title="Survey container" options="on|off" optionlabels="Yes|No">on</container>
<showpopups type="buttons" category="Other options" width="12" title="Show popups" options="1|0|-1" optionlabels="Popup|On page|No">1</showpopups>
<showclearall type="buttons" category="Other options" width="12" title="Show Clear All button" options="on|off" optionlabels="Yes|No">off</showclearall>
<fixnumauto type="buttons" category="Other options" width="12" title="Fix automatically numeric value" options="enable|partial|disable" optionlabels="Yes|For expression|No">enable</fixnumauto>
<!-- Images
<!-- Page background + Top of the page (logos)
HOUSE-STYLE: logos, background image and bodybackgroundcolor are set per
variant via variants/<client>.json -->
<!-- Images -->
<!-- (logos now carry category "Top of the page", the background options "Page background" — row 159) -->
<!-- Logos (Prompt M): per logo (left=brand, center, right) a file dropdown whose
FIRST option is "No logo" (value "off", prepended by options.twig), a top
margin in px (plain number 0-100; the views add the "px"), and "Show logo
@ -112,21 +112,21 @@
The old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, the shared
logotopmargin) were removed; variants/build.php maps the variant json's
old keys onto these new keys. -->
<brandlogofile type="imagefile" category="Images" width="12" title="Logo file (left)">./files/logo-left.png</brandlogofile>
<brandlogotopmargin type="text" category="Images" width="12" title="Margin between logo and top of screen (left), in px (0-100)">30</brandlogotopmargin>
<brandshowoncomputer type="checkbox" category="Images" width="12" title="Computer screen">on</brandshowoncomputer>
<brandshowontablet type="checkbox" category="Images" width="12" title="Tablet">on</brandshowontablet>
<brandshowonmobile type="checkbox" category="Images" width="12" title="Mobile phone">off</brandshowonmobile>
<centerlogofile type="imagefile" category="Images" width="12" title="Logo file (center)">./files/logo.png</centerlogofile>
<centerlogotopmargin type="text" category="Images" width="12" title="Margin between logo and top of screen (center), in px (0-100)">30</centerlogotopmargin>
<centershowoncomputer type="checkbox" category="Images" width="12" title="Computer screen">on</centershowoncomputer>
<centershowontablet type="checkbox" category="Images" width="12" title="Tablet">on</centershowontablet>
<centershowonmobile type="checkbox" category="Images" width="12" title="Mobile phone">off</centershowonmobile>
<rightlogofile type="imagefile" category="Images" width="12" title="Logo file (right)">./files/logo-right.png</rightlogofile>
<rightlogotopmargin type="text" category="Images" width="12" title="Margin between logo and top of screen (right), in px (0-100)">30</rightlogotopmargin>
<rightshowoncomputer type="checkbox" category="Images" width="12" title="Computer screen">on</rightshowoncomputer>
<rightshowontablet type="checkbox" category="Images" width="12" title="Tablet">on</rightshowontablet>
<rightshowonmobile type="checkbox" category="Images" width="12" title="Mobile phone">off</rightshowonmobile>
<brandlogofile type="imagefile" category="Top of the page" width="12" title="Logo file (left)">./files/logo-left.png</brandlogofile>
<brandlogotopmargin type="text" category="Top of the page" width="12" title="Margin between logo and top of screen (left), in px (0-100)">30</brandlogotopmargin>
<brandshowoncomputer type="checkbox" category="Top of the page" width="12" title="Computer screen">on</brandshowoncomputer>
<brandshowontablet type="checkbox" category="Top of the page" width="12" title="Tablet">on</brandshowontablet>
<brandshowonmobile type="checkbox" category="Top of the page" width="12" title="Mobile phone">off</brandshowonmobile>
<centerlogofile type="imagefile" category="Top of the page" width="12" title="Logo file (center)">./files/logo.png</centerlogofile>
<centerlogotopmargin type="text" category="Top of the page" width="12" title="Margin between logo and top of screen (center), in px (0-100)">30</centerlogotopmargin>
<centershowoncomputer type="checkbox" category="Top of the page" width="12" title="Computer screen">on</centershowoncomputer>
<centershowontablet type="checkbox" category="Top of the page" width="12" title="Tablet">on</centershowontablet>
<centershowonmobile type="checkbox" category="Top of the page" width="12" title="Mobile phone">off</centershowonmobile>
<rightlogofile type="imagefile" category="Top of the page" width="12" title="Logo file (right)">./files/logo-right.png</rightlogofile>
<rightlogotopmargin type="text" category="Top of the page" width="12" title="Margin between logo and top of screen (right), in px (0-100)">30</rightlogotopmargin>
<rightshowoncomputer type="checkbox" category="Top of the page" width="12" title="Computer screen">on</rightshowoncomputer>
<rightshowontablet type="checkbox" category="Top of the page" width="12" title="Tablet">on</rightshowontablet>
<rightshowonmobile type="checkbox" category="Top of the page" width="12" title="Mobile phone">off</rightshowonmobile>
<!-- Prompt Q: order fixed — Background image, then Overall background color
(always relevant), then the three image-detail options which are only
relevant when a background image is shown (parent="backgroundimage",
@ -135,7 +135,7 @@
col 1 = overall background color (chooser) + background image on/off,
col 2 = the three image-detail options (hidden as a whole when the
image is off), col 3 empty. -->
<backgroundimage type="buttons" category="Images" width="12" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
<backgroundimage type="buttons" category="Page background" width="12" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
<!-- Row 149: the overall background color is a color-chooser dropdown like the
other chooser options (default|defaultbackgroundcolor|color1|color2|color3|
other) with a <key>custom colorpicker child; its DEFAULT is the Default
@ -143,7 +143,7 @@
"other" + hex into bodybackgroundcolorcustom (options.js), and
custom_header.twig resolves the mode via the cm() macro (a raw hex still
passes through directly). -->
<bodybackgroundcolor type="dropdown" category="Images" width="12" title="Overall background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<bodybackgroundcolor type="dropdown" category="Page background" width="12" title="Overall background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor" data-default="1">[Default background color]</option>
@ -152,10 +152,10 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></bodybackgroundcolor>
<bodybackgroundcolorcustom type="colorpicker" category="Images" width="12" title="Custom overall background color (for 'Other ...')" parent="bodybackgroundcolor">#ffffff</bodybackgroundcolorcustom>
<backgroundimagefixed type="buttons" category="Images" width="12" title="Background image fixed or scroll" options="fixed|scroll" optionlabels="Fixed|Scroll" parent="backgroundimage">scroll</backgroundimagefixed>
<backgroundimagedisplay type="buttons" category="Images" width="12" title="Background image display" options="tile|cover" optionlabels="Tile|Cover" parent="backgroundimage">tile</backgroundimagedisplay>
<backgroundimagefile type="imagefile" category="Images" width="12" title="Background image file" parent="backgroundimage">./files/tiledtexture.png</backgroundimagefile>
<bodybackgroundcolorcustom type="colorpicker" category="Page background" width="12" title="Custom overall background color (for 'Other ...')" parent="bodybackgroundcolor">#ffffff</bodybackgroundcolorcustom>
<backgroundimagefixed type="buttons" category="Page background" width="12" title="Background image fixed or scroll" options="fixed|scroll" optionlabels="Fixed|Scroll" parent="backgroundimage">scroll</backgroundimagefixed>
<backgroundimagedisplay type="buttons" category="Page background" width="12" title="Background image display" options="tile|cover" optionlabels="Tile|Cover" parent="backgroundimage">tile</backgroundimagedisplay>
<backgroundimagefile type="imagefile" category="Page background" width="12" title="Background image file" parent="backgroundimage">./files/tiledtexture.png</backgroundimagefile>
<!-- Questions
HOUSE-STYLE: the colorpicker options in this section (question
@ -189,10 +189,10 @@
<questionborderradiusBR type="duration" category="Questions" width="12" title="Border radius bottom right" parent="questionborder">5px</questionborderradiusBR>
<checkboxcolor type="colorpicker" category="Questions" width="12" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
<!-- Progress -->
<!-- Progress bar position (now category "Top of the page" — row 159) -->
<!-- Prompt N: listing order swapped — "In header" FIRST, then "Under header".
The stored value semantics are unchanged (in|under); the default stays "under". -->
<progressbarposition type="buttons" category="Progress" width="6" title="Position of the progress bar" options="in|under" optionlabels="In header|Under header">under</progressbarposition>
<progressbarposition type="buttons" category="Top of the page" width="6" title="Position of the progress bar" options="in|under" optionlabels="In header|Under header">under</progressbarposition>
<!-- Header sticky per screen size (shown in the "Top of the page" tab).
Breakpoints are Bootstrap's default ones: phone < md (768px),
@ -221,12 +221,12 @@
HOUSE-STYLE: ALL colorpickers in this section (header, navbar menu,
slider, progressbar, privacy) are house-style colors and are set per
variant via variants/<client>.json.
NOTE (Prompt U): primarycolor, fontcolor and the new secondarycolor
moved to the "Fonts" category (they live in the "Fonts and colors"
tab now); header/navbar/progressbar colors are pulled into the
"Top of the page" tab by options.twig. What remains here in the
Colors pane: sliderhandlecolor + privacybackgroundcolor (final
Colors layout = Prompt T, still open). -->
NOTE (Prompt U + row 159): primarycolor, fontcolor and the new
secondarycolor moved to the "Default fonts and colors" category;
header/navbar/progressbar colors carry category "Top of the page"
directly. What remains here in the Colors category:
sliderhandlecolor + privacybackgroundcolor (no tab in the custom
page yet — final Colors layout = Prompt T, still open). -->
<!-- Various colors -->
<!-- Backgrounds of navbar/page stay plain colorpickers (owner decision
2026-11-26, row 115): they are mostly NOT one of the default colors,
@ -241,7 +241,7 @@
carries the [ ] marker of that option's own default. A legacy stored HEX
value migrates client-side to mode "other" + hex into the <key>custom
child (options.js colorModeUI), and the views accept a raw hex directly. -->
<headerbackgroundcolor type="dropdown" category="Colors" width="12" title="Header background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<headerbackgroundcolor type="dropdown" category="Top of the page" width="12" title="Header background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor" data-default="1">[Default background color]</option>
@ -250,7 +250,7 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></headerbackgroundcolor>
<headerbackgroundcolorcustom type="colorpicker" category="Colors" width="12" title="Custom header background color (for 'Other ...')" parent="headerbackgroundcolor">#ffffff</headerbackgroundcolorcustom>
<headerbackgroundcolorcustom type="colorpicker" category="Top of the page" width="12" title="Custom header background color (for 'Other ...')" parent="headerbackgroundcolor">#ffffff</headerbackgroundcolorcustom>
<!-- Working example (row 115, reordered + relabelled row 125): menu item color
as a preset dropdown. The KEY navbarfontcolor is kept (stored DB values
stay attached); the type changes colorpicker -> dropdown with modes
@ -275,7 +275,7 @@
"Default background color", "Color 1", "Color 2", "Color 3",
"Other ..." — options.js appends each entry's live hexcode in brackets
(for "Other ..." the custom color's hex) and bolds the default. -->
<navbarfontcolor type="dropdown" category="Colors" width="12" title="Text color in header" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<navbarfontcolor type="dropdown" category="Top of the page" width="12" title="Text color in header" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<dropdownoptions>
<option value="default" data-default="1">[Default font color]</option>
<option value="defaultbackgroundcolor">Default background color</option>
@ -284,14 +284,14 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></navbarfontcolor>
<navbarfontcolorcustom type="colorpicker" category="Colors" width="12" title="Custom text color in header (for 'Other ...')" parent="navbarfontcolor">#444444</navbarfontcolorcustom>
<navbarfontcolorcustom type="colorpicker" category="Top of the page" width="12" title="Custom text color in header (for 'Other ...')" parent="navbarfontcolor">#444444</navbarfontcolorcustom>
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
<!-- Row 135: progress bar colors as color-choosers. Layout in the "Top of the
page" tab (options.twig slots): progress bar color = COLUMN 1, progress
background = COLUMN 2, progress font color = COLUMN 3 (with an extra tip
underneath). Defaults: progress bar color = Color 1, progress background =
Default background color, progress font color = Default font color. -->
<progressbarcolor type="dropdown" category="Colors" width="12" title="Progress bar color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">color1
<progressbarcolor type="dropdown" category="Top of the page" width="12" title="Progress bar color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">color1
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor">Default background color</option>
@ -300,8 +300,8 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></progressbarcolor>
<progressbarcolorcustom type="colorpicker" category="Colors" width="12" title="Custom progress bar color (for 'Other ...')" parent="progressbarcolor">#5e1c64</progressbarcolorcustom>
<progressbarbackgroundcolor type="dropdown" category="Colors" width="12" title="Progress bar background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<progressbarcolorcustom type="colorpicker" category="Top of the page" width="12" title="Custom progress bar color (for 'Other ...')" parent="progressbarcolor">#5e1c64</progressbarcolorcustom>
<progressbarbackgroundcolor type="dropdown" category="Top of the page" width="12" title="Progress bar background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
<dropdownoptions>
<option value="default">Default font color</option>
<option value="defaultbackgroundcolor" data-default="1">[Default background color]</option>
@ -310,8 +310,8 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></progressbarbackgroundcolor>
<progressbarbackgroundcolorcustom type="colorpicker" category="Colors" width="12" title="Custom progress bar background color (for 'Other ...')" parent="progressbarbackgroundcolor">#eeeeee</progressbarbackgroundcolorcustom>
<progressbarfontcolor type="dropdown" category="Colors" width="12" title="Progress bar font color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<progressbarbackgroundcolorcustom type="colorpicker" category="Top of the page" width="12" title="Custom progress bar background color (for 'Other ...')" parent="progressbarbackgroundcolor">#eeeeee</progressbarbackgroundcolorcustom>
<progressbarfontcolor type="dropdown" category="Top of the page" width="12" title="Progress bar font color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<dropdownoptions>
<option value="default" data-default="1">[Default font color]</option>
<option value="defaultbackgroundcolor">Default background color</option>
@ -320,9 +320,9 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></progressbarfontcolor>
<progressbarfontcolorcustom type="colorpicker" category="Colors" width="12" title="Custom progress bar font color (for 'Other ...')" parent="progressbarfontcolor">#ffffff</progressbarfontcolorcustom>
<progressbarfontcolorcustom type="colorpicker" category="Top of the page" width="12" title="Custom progress bar font color (for 'Other ...')" parent="progressbarfontcolor">#ffffff</progressbarfontcolorcustom>
<privacybackgroundcolor type="colorpicker" category="Colors" width="12" title="Privacy background color" options="on|off" optionlabels="Yes|No">lightyellow</privacybackgroundcolor>
<!-- fonts
<!-- Default fonts and colors
HOUSE-STYLE: the whole Fonts section (font choice, fontsize and all
font sizes/weights) is house-style specific.
@ -359,9 +359,9 @@
To bundle an open source font in THIS mother theme itself, follow
files/fonts/README.md (English walkthrough: files/fonts/ + css/fonts.css
+ the "Bundled open source fonts" optgroup below). -->
<!-- fonts -->
<!-- Default fonts and colors (row 159: category renamed to the tab label) -->
<!-- When adding new items, please keep fonts ordered alphabetically -->
<font type="dropdown" category="Fonts" width="4" title="Default font (body text)">noto_sans
<font type="dropdown" category="Default fonts and colors" width="4" title="Default font (body text)">noto_sans
<dropdownoptions>
<!-- Open source fonts bundled with this theme itself: font files in files/fonts/, @font-face + generic .font-<value> rules in css/fonts.css. See files/fonts/README.md (English) for how to add your own font here. -->
<optgroup label="Bundled open source fonts">
@ -391,23 +391,23 @@
</optgroup>
</dropdownoptions>
</font>
<!-- Prompt U: the "Fonts" tab is rendered as "Fonts and colors" with a special
<!-- Prompt U: the "Default fonts and colors" tab has a special
layout (options.twig): TOP ROW column 1 = font, fontcolor, fontsize;
column 2 = primarycolor, secondarycolor (both moved here from the Colors
category); then an <hr>; then per-element combo rows (fontselect +
textcolor dropdown + conditional textcolorcustom picker); then the
size/weight options below. HOUSE-STYLE: fontcolor, primarycolor and
secondarycolor are set per variant via variants/<client>.json. -->
<fontcolor type="colorpicker" category="Fonts" width="12" title="Default font color (body text)" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
<fontsize type="buttons" category="Fonts" width="12" title="Base font size (body text)" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|XLarge&#10;(20 px)">16px</fontsize>
<fontcolor type="colorpicker" category="Default fonts and colors" width="12" title="Default font color (body text)" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
<fontsize type="buttons" category="Default fonts and colors" width="12" title="Base font size (body text)" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|XLarge&#10;(20 px)">16px</fontsize>
<!-- Row 124: "Default background color" — column 1 of the colors row in the
"Default fonts and colors" tab (that row is now 4 columns). It is also the
5th preset of the experimental color-chooser (navbarfontcolor dropdown +
swatches), so users can pick it anywhere a named color is offered. -->
<defaultbackgroundcolor type="colorpicker" category="Fonts" width="12" title="Default background color" options="on|off" optionlabels="Yes|No">#ffffff</defaultbackgroundcolor>
<primarycolor type="colorpicker" category="Fonts" width="12" title="Color 1 (primary)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
<secondarycolor type="colorpicker" category="Fonts" width="12" title="Color 2" options="on|off" optionlabels="Yes|No">#888888</secondarycolor>
<tertiarycolor type="colorpicker" category="Fonts" width="12" title="Color 3" options="on|off" optionlabels="Yes|No">#dddddd</tertiarycolor>
<defaultbackgroundcolor type="colorpicker" category="Default fonts and colors" width="12" title="Default background color" options="on|off" optionlabels="Yes|No">#ffffff</defaultbackgroundcolor>
<primarycolor type="colorpicker" category="Default fonts and colors" width="12" title="Color 1 (primary)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
<secondarycolor type="colorpicker" category="Default fonts and colors" width="12" title="Color 2" options="on|off" optionlabels="Yes|No">#888888</secondarycolor>
<tertiarycolor type="colorpicker" category="Default fonts and colors" width="12" title="Color 3" options="on|off" optionlabels="Yes|No">#dddddd</tertiarycolor>
<!-- Per-element font+color combos (Prompt U). Each element gets:
- <el>font (type "fontselect"): the SAME choices as the base "font"
dropdown above (bundled + variant-custom + browser fonts), plus a
@ -440,9 +440,10 @@
<option value="other">Other…</option>
</dropdownoptions></answerstextcolor>
<answerstextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for answers and help texts" parent="answerstextcolor">#444444</answerstextcolorcustom>
<!-- Row 157: the group options are shown in the dedicated "Groups" tab (pulled
out of the Questions category by aGroupKeys in options.twig, laid out in
two columns there: col 1 = group title, col 2 = group description).
<!-- Row 157/159: the group options carry category "Groups" (row 159: the
category names in this file ARE the tab labels of options.twig, so the
core options renderer groups them the same way); options.twig lays the
Groups tab out in two columns: col 1 = group title, col 2 = group description.
grouptitletextcolor/groupdescriptiontextcolor use the color-chooser scheme
(row 135 pattern: mode dropdown default|defaultbackgroundcolor|color1|
color2|color3|other + <key>custom child, default "Default font color" =
@ -452,8 +453,8 @@
(normal|bold|italic|bolditalic) — font-style included; custom_header.twig
maps them to font-weight/font-style. Defaults keep the old look: title
bold, description normal. -->
<grouptitlefont type="fontselect" category="Questions" width="4" title="Font for group title">base</grouptitlefont>
<grouptitletextcolor type="dropdown" category="Questions" width="12" title="Group title color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<grouptitlefont type="fontselect" category="Groups" width="4" title="Font for group title">base</grouptitlefont>
<grouptitletextcolor type="dropdown" category="Groups" width="12" title="Group title color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<dropdownoptions>
<option value="default" data-default="1">[Default font color]</option>
<option value="defaultbackgroundcolor">Default background color</option>
@ -462,9 +463,9 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></grouptitletextcolor>
<grouptitletextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom group title color (for 'Other ...')" parent="grouptitletextcolor">#444444</grouptitletextcolorcustom>
<groupdescriptionfont type="fontselect" category="Questions" width="4" title="Font for group description">base</groupdescriptionfont>
<groupdescriptiontextcolor type="dropdown" category="Questions" width="12" title="Group description color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<grouptitletextcolorcustom type="colorpicker" category="Groups" width="12" title="Custom group title color (for 'Other ...')" parent="grouptitletextcolor">#444444</grouptitletextcolorcustom>
<groupdescriptionfont type="fontselect" category="Groups" width="4" title="Font for group description">base</groupdescriptionfont>
<groupdescriptiontextcolor type="dropdown" category="Groups" width="12" title="Group description color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">default
<dropdownoptions>
<option value="default" data-default="1">[Default font color]</option>
<option value="defaultbackgroundcolor">Default background color</option>
@ -473,7 +474,7 @@
<option value="color3">Color 3</option>
<option value="other">Other ...</option>
</dropdownoptions></groupdescriptiontextcolor>
<groupdescriptiontextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom group description color (for 'Other ...')" parent="groupdescriptiontextcolor">#444444</groupdescriptiontextcolorcustom>
<groupdescriptiontextcolorcustom type="colorpicker" category="Groups" width="12" title="Custom group description color (for 'Other ...')" parent="groupdescriptiontextcolor">#444444</groupdescriptiontextcolorcustom>
<buttonsfont type="fontselect" category="Questions" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
<buttonstextcolor type="dropdown" category="Questions" width="12" title="Text color for the buttons (Previous/Next/Submit)" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
<dropdownoptions>
@ -485,10 +486,10 @@
<buttonstextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for the buttons (Previous/Next/Submit)" parent="buttonstextcolor">#444444</buttonstextcolorcustom>
<questiontitlefontsize type="buttons" category="Questions" width="6" title="Question title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</questiontitlefontsize>
<questiontitlefontweight type="buttons" category="Questions" width="6" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
<grouptitlefontsize type="buttons" category="Questions" width="6" title="Group title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">2.0rem</grouptitlefontsize>
<grouptitlefontoptions type="buttons" category="Questions" width="6" title="Group title font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">bold</grouptitlefontoptions>
<groupdescriptionfontsize type="buttons" category="Questions" width="6" title="Group description font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</groupdescriptionfontsize>
<groupdescriptionfontoptions type="buttons" category="Questions" width="6" title="Group description font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">normal</groupdescriptionfontoptions>
<grouptitlefontsize type="buttons" category="Groups" width="6" title="Group title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">2.0rem</grouptitlefontsize>
<grouptitlefontoptions type="buttons" category="Groups" width="6" title="Group title font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">bold</grouptitlefontoptions>
<groupdescriptionfontsize type="buttons" category="Groups" width="6" title="Group description font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</groupdescriptionfontsize>
<groupdescriptionfontoptions type="buttons" category="Groups" width="6" title="Group description font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">normal</groupdescriptionfontoptions>
</options>
<!-- Here datas about how LimeSurvey should load the theme -->

View file

@ -12,17 +12,18 @@
(fontselect = per-element font override: same choices as the base "font"
dropdown plus "Same as base font"; see the branch below.)
Tab order: the "Fonts" category tab is FIRST (default font + per-element font
overrides), then the "Top of the page" tab, then the "Page background" tab (the
config.xml "Images" category), then the "Groups" tab (all group-related options
of the "Questions" category), then the other remaining categories, and LAST the
"Other options" tab (the config.xml "Simple options" category).
Tab order: the "Default fonts and colors" category tab is FIRST (default font +
per-element font overrides), then the "Top of the page" tab, then the "Page
background" tab, then the "Groups" tab, then the other remaining categories,
and LAST the "Other options" tab.
Exception: the options that make up the TOP OF THE PAGE (header menu, logos,
header colors, progress bar) are pulled out of their config.xml categories
into a dedicated tab, "Top of the page" (see aTopOfPageKeys below).
Values are stored per option key, so this regrouping does not touch stored
values and needs no theme reset to take effect.
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.
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
@ -295,22 +296,24 @@
{% set aGroupCol1 = ['grouptitlefont', 'grouptitletextcolor', 'grouptitletextcolorcustom', 'grouptitlefontsize', 'grouptitlefontoptions'] %}
{% set aGroupCol2 = ['groupdescriptionfont', 'groupdescriptiontextcolor', 'groupdescriptiontextcolorcustom', 'groupdescriptionfontsize', 'groupdescriptionfontoptions'] %}
{# Tab list: FIRST the "Fonts" tab (where the default/base font is chosen and the
per-element font overrides live), then the "Top of the page" tab (keys =
aTopOfPageKeys), then row 147: the "Page background" tab (the config.xml "Images"
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, except the top-of-page and group keys). #}
{# Tab list: FIRST the "Default fonts and colors" tab (where the default/base font
is chosen and the per-element font overrides live), then the "Top of the page"
tab (keys = aTopOfPageKeys), then 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. #}
{% set aTabs = [] %}
{% if 'Fonts' in aOptionAttributes.categories %}
{% set aTabs = [{ 'id': 'category-fonts', 'label': 'Default fonts and colors', 'category': 'Fonts', 'keys': null }] %}
{% if 'Default fonts and colors' in aOptionAttributes.categories %}
{% set aTabs = [{ 'id': 'category-fonts', 'label': 'Default fonts and colors', 'category': 'Default fonts and colors', 'keys': null }] %}
{% endif %}
{% set aTabs = aTabs|merge([{ 'id': 'top-of-page', 'label': 'Top of the page', 'category': 'Top of the page', 'keys': aTopOfPageKeys }]) %}
{# row 147: "Images" category -> "Page background" tab, directly after Top of the page #}
{# row 147/159: "Page background" category -> the Page background tab, directly after
Top of the page #}
{% set aImagesKeys = [] %}
{% for key, attr in aOptionAttributes.optionAttributes %}
{% if key != 'ajaxmode' and attr.category == 'Images' and key not in aTopOfPageKeys %}
{% if key != 'ajaxmode' and attr.category == 'Page background' and key not in aTopOfPageKeys %}
{% set aImagesKeys = aImagesKeys|merge([key]) %}
{% endif %}
{% endfor %}
@ -319,17 +322,17 @@
image on/off; col 2 = the three image-detail options; col 3 stays empty #}
{% set aImagesPaneKeys = ['bodybackgroundcolor', 'bodybackgroundcolorcustom', 'backgroundimage', 'backgroundimagefile', 'backgroundimagefixed', 'backgroundimagedisplay'] %}
{% if aImagesKeys is not empty %}
{% set aTabs = aTabs|merge([{ 'id': 'category-images', 'label': 'Page background', 'category': 'Images', 'keys': aImagesPaneKeys }]) %}
{% set aTabs = aTabs|merge([{ 'id': 'category-images', 'label': 'Page background', 'category': 'Page background', 'keys': aImagesPaneKeys }]) %}
{% endif %}
{# row 147/157: dedicated "Groups" tab with all group-related options (aGroupKeys).
category 'Groups' (no config.xml category of that name) so the pane renders the
{# 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
slot layout below instead of the Questions 3-column grid. #}
{% set aTabs = aTabs|merge([{ 'id': 'groups', 'label': 'Groups', 'category': 'Groups', 'keys': aGroupKeys }]) %}
{% for category in aOptionAttributes.categories %}
{% if category != 'Fonts' and category != 'Top of the page' and category != 'Colors' and category != 'Images' and category != 'Simple options' %}
{% if category != 'Default fonts and colors' and category != 'Top of the page' and category != 'Colors' and category != 'Page background' and category != 'Groups' and category != 'Other options' %}
{# The "Colors" tab is removed on purpose. Its only remaining options are
sliderhandlecolor and privacybackgroundcolor (the other Colors keys are
pulled into "Top of the page" via aTopOfPageKeys) — TODO: place these two
sliderhandlecolor and privacybackgroundcolor (the other Colors keys carry
category "Top of the page" now) — TODO: place these two
options on another tab. #}
{# Resolve this category's keys once and skip the tab entirely when none
remain: e.g. "Progress" — its only option (progressbarposition)
@ -345,17 +348,17 @@
{% endif %}
{% endif %}
{% endfor %}
{# row 148: the "Simple options" category renders as "Other options", LAST in the
{# row 148/159: the "Other options" category renders LAST in the
tab row (id kept as 'category-simple-options' so the stored tab preference
stays valid) #}
{% set aSimpleKeys = [] %}
{% for key, attr in aOptionAttributes.optionAttributes %}
{% if key != 'ajaxmode' and attr.category == 'Simple options' and key not in aTopOfPageKeys and key not in aGroupKeys %}
{% if key != 'ajaxmode' and attr.category == 'Other options' and key not in aTopOfPageKeys and key not in aGroupKeys %}
{% set aSimpleKeys = aSimpleKeys|merge([key]) %}
{% endif %}
{% endfor %}
{% if aSimpleKeys is not empty %}
{% set aTabs = aTabs|merge([{ 'id': 'category-simple-options', 'label': 'Other options', 'category': 'Simple options', 'keys': null }]) %}
{% set aTabs = aTabs|merge([{ 'id': 'category-simple-options', 'label': 'Other options', 'category': 'Other options', 'keys': null }]) %}
{% endif %}
<ul class="nav nav-tabs mt-3" role="tablist">
@ -407,7 +410,7 @@
<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 %}
{% if tab.category == 'Images' %}
{% if tab.category == 'Page background' %}
{# 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'] : '')) %}
@ -434,9 +437,9 @@
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. #}
{% set bFontsPane = tab.category == 'Fonts' %}
{% set bFontsPane = tab.category == 'Default fonts and colors' %}
{% set bTopPane = tab.id == 'top-of-page' %}
{% set bImagesPane = tab.category == 'Images' %}
{% set bImagesPane = tab.category == 'Page background' %}
{% set bGroupsPane = tab.id == 'groups' %}
{% set fSlot = 'rest' %}
{% if bFontsPane %}
@ -732,7 +735,7 @@
{% elseif attr.type == 'dropdown' %}
{% set ddClasses = 'form-select selector_option_value_field' %}
{% if attr.parent != '' %}{% set ddClasses = ddClasses ~ ' selector_radio_childfield' %}{% endif %}
{% if tab.category == 'Images' %}{% set ddClasses = ddClasses ~ ' selector_image_selector' %}{% endif %}
{% if tab.category == 'Page background' %}{% set ddClasses = ddClasses ~ ' selector_image_selector' %}{% endif %}
{% if key == 'font' %}{% set ddClasses = ddClasses ~ ' selector_fontselect' %}{% endif %}
{% if key in aColorChooserKeys %}{% set ddClasses = ddClasses ~ ' selector_color_mode' %}{% endif %}
<select class="{{ ddClasses }}"
@ -830,7 +833,7 @@
{% endif %}
{% endif %}
{% endfor %}
{% if tab.category == 'Images' %}
{% if tab.category == 'Page background' %}
{# row 149/150: close the open Page background column; after col 2 append
the empty col 3. Row 150: INSIDE col 2, under the image options, the
upload facility + help text — the column div carries option-visibility
@ -881,7 +884,7 @@
{% if tab.id == 'groups' and fLastSlot in ['g1', 'g2'] %}</div>{% endif %}
{# close an open slot container at the end of a Fonts/Top-of-page pane
(every non-logo, non-rest slot has exactly two open divs: row + col) #}
{% if (tab.category == 'Fonts' or tab.id == 'top-of-page') and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %}</div></div>{% endif %}
{% if (tab.category == 'Default fonts and colors' or tab.id == 'top-of-page') and fLastSlot != 0 and fLastSlot != 'rest' and fLastSlot != 'logo' %}</div></div>{% endif %}
</div>
{# row 150: the upload facility is NOT full-width at the bottom any more — it