feat(options): Questions tab 'Answer options and subquestions' section; answerstextcolor becomes a 6-way color chooser (row 178 plan P3)

New section in the Questions pane (h3 + first col-md-4 of a 3-column grid,
only it used): answersfont + answerstextcolor + answerstextcolorcustom,
moved up in config.xml between the title block and the help options,
width 12 -> 4. answerstextcolor upgraded to the chooser scheme
(default|defaultbackgroundcolor|color1|color2|color3|other, default stays
'default'), added to aColorChooserKeys in options.twig/options.js
(OPTIONS_JS_TOKEN 20261129.2) and to the build.php chooser migration.
Views (answers, survey_question_help, valid_message_and_help): 6-way
mapping with legacy primary/secondary + raw hex passthrough.
All 3 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:08:49 +01:00
commit e061f7c0f3

View file

@ -272,13 +272,14 @@ foreach ($logoPositions as $pos) {
// headerbackgroundcolor, progressbarcolor, progressbarbackgroundcolor,
// progressbarfontcolor, bodybackgroundcolor, grouptitletextcolor,
// groupdescriptiontextcolor; row 180 plan P2 adds questiontitletextcolor,
// questiontitlebackgroundcolor, questionbackgroundcolor) became mode dropdowns
// questiontitlebackgroundcolor, questionbackgroundcolor; row 184 plan P3 adds
// answerstextcolor) 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'];
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor'];
$colorChooserLegacyModes = ['primary' => 'color1', 'secondary' => 'color2'];
foreach ($colorChooserKeys as $ck) {
if (isset($definition['options'][$ck])