feat(options): Questions tab 'Question help' section; help background becomes a 6-way color chooser (row 178 plan P4)

New section (h3 + first col-md-4 of a 3-column grid, only it used):
questionhelpbackgroundcolor as 6-way chooser (default 'other' + custom
#fff3cd, look unchanged) + questionhelpbackgroundcolorcustom, the plain
help font color picker (stays plain per row-178 decision 8) and the help
text position; keys moved between the answers block and the border options,
legacy col 1 is empty now. questionhelpbackgroundcolor joined
aColorChooserKeys (twig + js, OPTIONS_JS_TOKEN 20261129.3) and the
build.php chooser migration; custom_header.twig resolves it via cm()
(legacy hex passes through). Variants rebuilt, example config synced.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-29 15:17:56 +01:00
commit ff998489b9

View file

@ -273,13 +273,14 @@ foreach ($logoPositions as $pos) {
// progressbarfontcolor, bodybackgroundcolor, grouptitletextcolor,
// groupdescriptiontextcolor; row 180 plan P2 adds questiontitletextcolor,
// questiontitlebackgroundcolor, questionbackgroundcolor; row 184 plan P3 adds
// answerstextcolor) became mode dropdowns
// answerstextcolor; row 186 plan P4 adds questionhelpbackgroundcolor) became mode
// dropdowns
// (default|defaultbackgroundcolor|color1|color2|color3|other) with a <key>custom
// colorpicker child. A legacy HEX value in the json means "custom color": map it
// to mode "other" and move the hex into the <key>custom child, so the variant
// default stays valid for the dropdown. A legacy mode "primary"/"secondary"
// (old 4-way textcolor dropdown) maps to "color1"/"color2".
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor'];
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor', 'questionhelpbackgroundcolor'];
$colorChooserLegacyModes = ['primary' => 'color1', 'secondary' => 'color2'];
foreach ($colorChooserKeys as $ck) {
if (isset($definition['options'][$ck])