feat(options): Questions tab 'Question title and body' section with 6-way color choosers (row 178 plan P2)
config.xml: new section keys questiontitlefont/textcolor(+custom)/fontsize/ fontoptions + legacy fontcolor (col 1), questiontitlebackgroundcolor(+custom) (col 2), questionbackgroundcolor(+custom) (col 3); old width-12 Prompt-U keys and plain colorpickers replaced; questiontitlefontweight -> questiontitlefontoptions. options.twig: title section slots (were prepared in P1), 3 keys join aColorChooserKeys, OPTIONS_JS_TOKEN 20261129.1. options.js: same 3 keys in its aColorChooserKeys. Views: choosers resolved via cm() (chooser wins; legacy hex and primary/secondary modes pass through; legacy picker used when the mode key is absent); fontoptions mapped to weight/style with legacy fontweight fallback. build.php: chooser migration list + questiontitle fontweight migration. All 3 variants rebuilt (defensie legacy hex -> other+custom), example config synced. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
c4ec304dd0
commit
14eb1c2a99
7 changed files with 214 additions and 92 deletions
76
config.xml
76
config.xml
|
|
@ -410,25 +410,71 @@
|
||||||
Previous/Next/Submit buttons). NOT house-style (structural). -->
|
Previous/Next/Submit buttons). NOT house-style (structural). -->
|
||||||
<questiondistance type="text" category="Questions" width="6" title="Distance between two questions (px or rem)">30px</questiondistance>
|
<questiondistance type="text" category="Questions" width="6" title="Distance between two questions (px or rem)">30px</questiondistance>
|
||||||
<questiondistancebottom type="text" category="Questions" width="6" title="Distance between last question and buttons at bottom of page (px or rem)">30px</questiondistancebottom>
|
<questiondistancebottom type="text" category="Questions" width="6" title="Distance between last question and buttons at bottom of page (px or rem)">30px</questiondistancebottom>
|
||||||
|
<!-- Row 178 plan P2: section "Question title and body" (options.twig) — three
|
||||||
|
col-md-4 columns (width 4). Col 1 = Font chooser / color chooser for the question
|
||||||
|
title (fontselect + 6-way text-color mode + custom + size + font options), plus
|
||||||
|
the legacy plain font-color picker. Col 2 = title background color chooser
|
||||||
|
(default mode color1 = Color 1). Col 3 = question body background color chooser
|
||||||
|
(default mode defaultbackgroundcolor). A "chooser" = 6-way mode dropdown +
|
||||||
|
"Other ..." custom colorpicker child, exactly like the Groups tab text colors /
|
||||||
|
Header background color. In the views (custom_header.twig) the CHOOSER wins;
|
||||||
|
questiontitlefontcolor stays visible as a legacy picker. HOUSE-STYLE: the color
|
||||||
|
defaults below are house-style specific (set per variant json; build.php migrates
|
||||||
|
legacy hex/mode values). -->
|
||||||
|
<questiontitlefont type="fontselect" category="Questions" width="4" title="Font for question titles">base</questiontitlefont>
|
||||||
|
<questiontitletextcolor type="dropdown" category="Questions" width="4" title="Text color for question titles" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">other
|
||||||
|
<dropdownoptions>
|
||||||
|
<option value="default">Default font color</option>
|
||||||
|
<option value="defaultbackgroundcolor">Default background color</option>
|
||||||
|
<option value="color1">Color 1</option>
|
||||||
|
<option value="color2">Color 2</option>
|
||||||
|
<option value="color3">Color 3</option>
|
||||||
|
<option value="other" data-default="1">[Other ...]</option>
|
||||||
|
</dropdownoptions></questiontitletextcolor>
|
||||||
|
<questiontitletextcolorcustom type="colorpicker" category="Questions" width="4" title="Custom text color for question titles (for 'Other ...')" parent="questiontitletextcolor">#ffffff</questiontitletextcolorcustom>
|
||||||
|
<questiontitlefontsize type="buttons" category="Questions" width="4" 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>
|
||||||
|
<questiontitlefontoptions type="buttons" category="Questions" width="4" title="Question title font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">bold</questiontitlefontoptions>
|
||||||
|
<questiontitlefontcolor type="colorpicker" category="Questions" width="4" title="Text color for question titles (legacy picker)" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
||||||
|
<questiontitlebackgroundcolor type="dropdown" category="Questions" width="4" title="Question title background 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>
|
||||||
|
<option value="color1" data-default="1">[Color 1]</option>
|
||||||
|
<option value="color2">Color 2</option>
|
||||||
|
<option value="color3">Color 3</option>
|
||||||
|
<option value="other">Other ...</option>
|
||||||
|
</dropdownoptions></questiontitlebackgroundcolor>
|
||||||
|
<questiontitlebackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question title background color (for 'Other ...')" parent="questiontitlebackgroundcolor">#5e1c64</questiontitlebackgroundcolorcustom>
|
||||||
|
<questionbackgroundcolor type="dropdown" category="Questions" width="4" title="Question body 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>
|
||||||
|
<option value="color1">Color 1</option>
|
||||||
|
<option value="color2">Color 2</option>
|
||||||
|
<option value="color3">Color 3</option>
|
||||||
|
<option value="other">Other ...</option>
|
||||||
|
</dropdownoptions></questionbackgroundcolor>
|
||||||
|
<questionbackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question body background color (for 'Other ...')" parent="questionbackgroundcolor">#ffffff</questionbackgroundcolorcustom>
|
||||||
<!-- Questions
|
<!-- Questions
|
||||||
HOUSE-STYLE: the colorpicker options in this section (question
|
HOUSE-STYLE: the colorpicker options in this section (question
|
||||||
title/background/help/help-font/border/checkbox colors) are house-style
|
title/background/help/help-font/border/checkbox colors) are house-style
|
||||||
colors. NOT house-style (structural, same for all variants):
|
colors. NOT house-style (structural, same for all variants):
|
||||||
questionborder, questionborderstyle, the borderradius values,
|
questionborder, questionborderstyle, the borderradius values,
|
||||||
questiondropdown and questionhelptextposition.
|
questiondropdown and questionhelptextposition.
|
||||||
Prompt R: order = the three columns of the Questions tab (options.twig
|
Row 178/179 plan: order = the sections of the Questions tab as rendered by
|
||||||
renders them in this order): col1 colors+help, col2 border + its
|
options.twig (aQSections/aQSlots): first the "Overall question" section
|
||||||
conditional children, col3 checkbox color. All width=12 — inside the
|
(width 6 = the single col-md-6), then the "Question title and body"
|
||||||
pane each option stacks as col-12 in its column. The border children
|
section (three col-md-4 columns, width 4): col1 title font chooser/color
|
||||||
|
chooser + legacy picker, col2 title background chooser, col3 body
|
||||||
|
background chooser; then the remaining legacy columns (help, border,
|
||||||
|
checkbox color), then the rest full-width (width 12). Inside a pane
|
||||||
|
column each option stacks as col-12. The border children
|
||||||
carry parent="questionborder"; the show-values "box|top" cannot be an
|
carry parent="questionborder"; the show-values "box|top" cannot be an
|
||||||
XML attribute (core passes only `parent` through), so the multi-value
|
XML attribute (core passes only `parent` through), so the multi-value
|
||||||
list lives in options.twig (aShowIfValues) and lands as
|
list lives in options.twig (aShowIfValues) and lands as
|
||||||
data-show-if-value="box|top". questionhelpfontcolor (NEW) is applied
|
data-show-if-value="box|top". questionhelpfontcolor is applied
|
||||||
in custom_header.twig on .question-help-container. -->
|
in custom_header.twig on .question-help-container. -->
|
||||||
<!-- Questions -->
|
<!-- Questions -->
|
||||||
<questiontitlebackgroundcolor type="colorpicker" category="Questions" width="4" title="Question title background color" options="on|off" optionlabels="Yes|No">#5e1c64</questiontitlebackgroundcolor>
|
|
||||||
<questiontitlefontcolor type="colorpicker" category="Questions" width="4" title="Question title font color" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
|
||||||
<questionbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question background color (not title)" options="on|off" optionlabels="Yes|No">#ffffff</questionbackgroundcolor>
|
|
||||||
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
||||||
<questionhelpfontcolor type="colorpicker" category="Questions" width="4" title="Question help font color" options="on|off" optionlabels="Yes|No">#444444</questionhelpfontcolor>
|
<questionhelpfontcolor type="colorpicker" category="Questions" width="4" title="Question help font color" options="on|off" optionlabels="Yes|No">#444444</questionhelpfontcolor>
|
||||||
<questionhelptextposition type="buttons" category="Questions" width="4" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
<questionhelptextposition type="buttons" category="Questions" width="4" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
||||||
|
|
@ -441,7 +487,8 @@
|
||||||
<questionborderradiusBL type="duration" category="Questions" width="4" title="Border radius bottom left" parent="questionborder">5px</questionborderradiusBL>
|
<questionborderradiusBL type="duration" category="Questions" width="4" title="Border radius bottom left" parent="questionborder">5px</questionborderradiusBL>
|
||||||
<questionborderradiusBR type="duration" category="Questions" width="4" title="Border radius bottom right" parent="questionborder">5px</questionborderradiusBR>
|
<questionborderradiusBR type="duration" category="Questions" width="4" title="Border radius bottom right" parent="questionborder">5px</questionborderradiusBR>
|
||||||
<checkboxcolor type="colorpicker" category="Questions" width="4" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
|
<checkboxcolor type="colorpicker" category="Questions" width="4" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
|
||||||
<!-- Per-element font+color combos (Prompt U). Each element gets:
|
<!-- Per-element font+color combos (Prompt U; row 178 plan P3/P6 move the
|
||||||
|
answers/buttons ones into their own sections/tab). Each element gets:
|
||||||
- <el>font (type "fontselect"): the SAME choices as the base "font"
|
- <el>font (type "fontselect"): the SAME choices as the base "font"
|
||||||
dropdown above (bundled + variant-custom + browser fonts), plus a
|
dropdown above (bundled + variant-custom + browser fonts), plus a
|
||||||
first option "Same as base font" (value "base" = no extra class, the
|
first option "Same as base font" (value "base" = no extra class, the
|
||||||
|
|
@ -453,15 +500,6 @@
|
||||||
color fontcolor). Resolved to an inline style="color: …" in the views.
|
color fontcolor). Resolved to an inline style="color: …" in the views.
|
||||||
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
|
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
|
||||||
= "other" (parent show-value "other"). -->
|
= "other" (parent show-value "other"). -->
|
||||||
<questiontitlefont type="fontselect" category="Questions" width="12" title="Font for question titles">base</questiontitlefont>
|
|
||||||
<questiontitletextcolor type="dropdown" category="Questions" width="12" title="Text color for question titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
|
||||||
<dropdownoptions>
|
|
||||||
<option value="default" data-default="1">[Default font color]</option>
|
|
||||||
<option value="primary">Primary color</option>
|
|
||||||
<option value="secondary">Secondary color</option>
|
|
||||||
<option value="other">Other…</option>
|
|
||||||
</dropdownoptions></questiontitletextcolor>
|
|
||||||
<questiontitletextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for question titles" parent="questiontitletextcolor">#444444</questiontitletextcolorcustom>
|
|
||||||
<answersfont type="fontselect" category="Questions" width="12" title="Font for answers and help texts">base</answersfont>
|
<answersfont type="fontselect" category="Questions" width="12" title="Font for answers and help texts">base</answersfont>
|
||||||
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
<dropdownoptions>
|
<dropdownoptions>
|
||||||
|
|
@ -480,8 +518,6 @@
|
||||||
<option value="other">Other…</option>
|
<option value="other">Other…</option>
|
||||||
</dropdownoptions></buttonstextcolor>
|
</dropdownoptions></buttonstextcolor>
|
||||||
<buttonstextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for the buttons (Previous/Next/Submit)" parent="buttonstextcolor">#444444</buttonstextcolorcustom>
|
<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="12" 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="12" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
|
||||||
|
|
||||||
<!-- Colors: no tab in the custom options page yet (Prompt T) — these two stay in core mode only. -->
|
<!-- Colors: no tab in the custom options page yet (Prompt T) — these two stay in core mode only. -->
|
||||||
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
|
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,11 @@ var ThemeOptions = function () {
|
||||||
var legacyModeValues = {};
|
var legacyModeValues = {};
|
||||||
// row 135: all options that use the color-chooser scheme (mode dropdown with
|
// row 135: all options that use the color-chooser scheme (mode dropdown with
|
||||||
// class selector_color_mode + swatch chips + a <key>custom colorpicker child);
|
// class selector_color_mode + swatch chips + a <key>custom colorpicker child);
|
||||||
// row 157: the group title/description text colors joined the scheme
|
// row 157: the group title/description text colors joined the scheme;
|
||||||
var aColorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor'];
|
// row 180 / plan P2: the Questions "title" section keys as well
|
||||||
|
// (questiontitletextcolor, questiontitlebackgroundcolor, questionbackgroundcolor).
|
||||||
|
// Must stay in sync with aColorChooserKeys in options/options.twig.
|
||||||
|
var aColorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor'];
|
||||||
// the 5 presets, in the SAME order as the dropdown options in config.xml
|
// the 5 presets, in the SAME order as the dropdown options in config.xml
|
||||||
// (object key order = swatch chip order) — row 125: "Default background color"
|
// (object key order = swatch chip order) — row 125: "Default background color"
|
||||||
// is the SECOND choice, right after "Default font color".
|
// is the SECOND choice, right after "Default font color".
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control).
|
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
|
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. #}
|
options/options.js changes, so every browser fetches the new file once. #}
|
||||||
{% set OPTIONS_JS_TOKEN = '20261127.1' %}
|
{% set OPTIONS_JS_TOKEN = '20261129.1' %}
|
||||||
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
|
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
|
||||||
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}
|
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@
|
||||||
|
|
||||||
{% set aFontElements = ['questiontitle', 'answers', 'grouptitle', 'groupdescription', 'buttons'] %}
|
{% set aFontElements = ['questiontitle', 'answers', 'grouptitle', 'groupdescription', 'buttons'] %}
|
||||||
|
|
||||||
{% set aColorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor'] %}
|
{% set aColorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor'] %}
|
||||||
|
|
||||||
{% set aShowIfValues = { 'questionborder': 'box|top', 'navbarfontcolor': 'other' } %}
|
{% set aShowIfValues = { 'questionborder': 'box|top', 'navbarfontcolor': 'other' } %}
|
||||||
{% for el in aFontElements %}{% set aShowIfValues = aShowIfValues|merge({ (el ~ 'textcolor'): 'other' }) %}{% endfor %}
|
{% for el in aFontElements %}{% set aShowIfValues = aShowIfValues|merge({ (el ~ 'textcolor'): 'other' }) %}{% endfor %}
|
||||||
|
|
@ -290,12 +290,26 @@
|
||||||
{% set aFontsCol2 = ['defaultbackgroundcolor'] %}
|
{% set aFontsCol2 = ['defaultbackgroundcolor'] %}
|
||||||
{% set aFontsCol3 = ['primarycolor', 'secondarycolor', 'tertiarycolor'] %}
|
{% set aFontsCol3 = ['primarycolor', 'secondarycolor', 'tertiarycolor'] %}
|
||||||
|
|
||||||
{% set aQuestionsCol1 = ['questiontitlebackgroundcolor', 'questiontitlefontcolor', 'questionbackgroundcolor', 'questionhelpbackgroundcolor', 'questionhelpfontcolor', 'questionhelptextposition'] %}
|
{% set aQuestionsCol1 = ['questionhelpbackgroundcolor', 'questionhelpfontcolor', 'questionhelptextposition'] %}
|
||||||
{% set aQuestionsCol2 = ['questionborder', 'questionbordercolor', 'questionborderstyle', 'questiondropdown', 'questionborderradiusTL', 'questionborderradiusTR', 'questionborderradiusBL', 'questionborderradiusBR'] %}
|
{% set aQuestionsCol2 = ['questionborder', 'questionbordercolor', 'questionborderstyle', 'questiondropdown', 'questionborderradiusTL', 'questionborderradiusTR', 'questionborderradiusBL', 'questionborderradiusBR'] %}
|
||||||
{% set aQuestionsCol3 = ['checkboxcolor'] %}
|
{% set aQuestionsCol3 = ['checkboxcolor'] %}
|
||||||
{# row 179 / plan P1: the "Overall question" section at the top of the Questions
|
{# row 178/179 plan: the Questions pane is built from SECTIONS — each section is an
|
||||||
pane — qCol 4, rendered as ONE col-md-6 column, followed by a full-width hr #}
|
h3 + its own row of columns and ends with a full-width hr. aQSections lists the
|
||||||
{% set aQuestionsOverall = ['questiondistance', 'questiondistancebottom'] %}
|
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. #}
|
||||||
|
{% set aQSections = [
|
||||||
|
{ 'id': 'overall', 'h3': 'Overall question', 'colClass': 'col-md-6' },
|
||||||
|
{ 'id': 'title', 'h3': 'Question title and body', 'colClass': 'col-md-4' }
|
||||||
|
] %}
|
||||||
|
{% 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',
|
||||||
|
'questiontitlebackgroundcolor': 'title:1', 'questiontitlebackgroundcolorcustom': 'title:1',
|
||||||
|
'questionbackgroundcolor': 'title:2', 'questionbackgroundcolorcustom': 'title:2'
|
||||||
|
} %}
|
||||||
|
|
||||||
{# row 147: all group-related options of the "Questions" category — they are
|
{# 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).
|
pulled out of the Questions tab into a dedicated "Groups" tab (aGroupsTab below).
|
||||||
|
|
@ -460,7 +474,7 @@
|
||||||
</div></div>
|
</div></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="row action_hide_on_inherit">
|
<div class="row action_hide_on_inherit">
|
||||||
{% set qLastCol = 0 %}
|
{% set qLastSlot = '' %}
|
||||||
{% set fLastSlot = 0 %}
|
{% set fLastSlot = 0 %}
|
||||||
{% for key in aTabKeys %}
|
{% for key in aTabKeys %}
|
||||||
{% set attr = aOptionAttributes.optionAttributes[key] ?? null %}
|
{% set attr = aOptionAttributes.optionAttributes[key] ?? null %}
|
||||||
|
|
@ -667,18 +681,31 @@
|
||||||
{% elseif key not in aLogoKeys %}
|
{% elseif key not in aLogoKeys %}
|
||||||
{% set bQuestionsPane = tab.category == 'Questions' %}
|
{% set bQuestionsPane = tab.category == 'Questions' %}
|
||||||
{% if bQuestionsPane %}
|
{% if bQuestionsPane %}
|
||||||
{# row 179: qCol 4 = the "Overall question" section (one
|
{# row 178 plan: slot "section:colIndex" from aQSlots, legacy
|
||||||
col-md-6), leaving it emits a full-width hr; border-start
|
columns as "legacy:N", full-width rest as "rest". On a
|
||||||
only between the grid columns 1-3 #}
|
section change: close the column (+ section row), emit the
|
||||||
{% set qCol = key in aQuestionsOverall ? 4 : (key in aQuestionsCol1 ? 1 : (key in aQuestionsCol2 ? 2 : (key in aQuestionsCol3 ? 3 : 0))) %}
|
full-width hr after the finished section, then the new h3
|
||||||
{% if qCol != qLastCol %}
|
and section row. border-start only between columns of the
|
||||||
{% if qLastCol == 4 %}</div></div><div class="row action_hide_on_inherit"><div class="col-12"><hr class="questions-section-hr"></div></div>
|
same section/legacy grid #}
|
||||||
{% elseif qLastCol > 0 %}</div>{% endif %}
|
{% set qSlot = aQSlots[key] ?? (key in aQuestionsCol1 ? 'legacy:1' : (key in aQuestionsCol2 ? 'legacy:2' : (key in aQuestionsCol3 ? 'legacy:3' : 'rest'))) %}
|
||||||
{% if qCol == 4 %}<div class="row action_hide_on_inherit questions-section-intro"><div class="col-12"><h3>{{ gT("Overall question") }}</h3></div></div><div class="row action_hide_on_inherit questions-overall-row"><div class="col-md-6 questions-col-overall">
|
{% if qSlot != qLastSlot %}
|
||||||
{% elseif qCol > 0 %}
|
{% set qSec = qSlot|split(':')[0] %}{% set qCi = qSlot|split(':')[1] %}
|
||||||
<div class="col-md-4{% if qLastCol in [1, 2, 3] %} border-start{% endif %} questions-col-{{ qCol }}">
|
{% 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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set qLastCol = qCol %}
|
{% 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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# row 163: inside a slot pane (Questions columns, Header, Page
|
{# row 163: inside a slot pane (Questions columns, Header, Page
|
||||||
|
|
@ -931,7 +958,10 @@
|
||||||
{% elseif fLastSlot == 'bg1' %}</div>
|
{% elseif fLastSlot == 'bg1' %}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if tab.category == 'Questions' and qLastCol == 4 %}</div></div>{% elseif tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
|
{% if tab.category == 'Questions' and qLastSlot != '' and qLastSlot != 'rest' %}
|
||||||
|
{% set lSecEnd = qLastSlot|split(':')[0] %}
|
||||||
|
{% if lSecEnd != 'legacy' %}</div></div>{% else %}</div>{% endif %}
|
||||||
|
{% endif %}
|
||||||
{# row 157: close the open Groups column (each groups slot opens exactly
|
{# row 157: close the open Groups column (each groups slot opens exactly
|
||||||
one div: the col-md-6) #}
|
one div: the col-md-6) #}
|
||||||
{% if tab.id == 'groups' and fLastSlot in ['g1', 'g2'] %}</div>{% endif %}
|
{% if tab.id == 'groups' and fLastSlot in ['g1', 'g2'] %}</div>{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -271,13 +271,14 @@ foreach ($logoPositions as $pos) {
|
||||||
// --- Row 115/135/149/157 migration: the color-chooser options (navbarfontcolor,
|
// --- Row 115/135/149/157 migration: the color-chooser options (navbarfontcolor,
|
||||||
// headerbackgroundcolor, progressbarcolor, progressbarbackgroundcolor,
|
// headerbackgroundcolor, progressbarcolor, progressbarbackgroundcolor,
|
||||||
// progressbarfontcolor, bodybackgroundcolor, grouptitletextcolor,
|
// progressbarfontcolor, bodybackgroundcolor, grouptitletextcolor,
|
||||||
// groupdescriptiontextcolor) became mode dropdowns (default|defaultbackgroundcolor|
|
// groupdescriptiontextcolor; row 180 plan P2 adds questiontitletextcolor,
|
||||||
// color1|color2|color3|other) with a <key>custom colorpicker child. A legacy HEX
|
// questiontitlebackgroundcolor, questionbackgroundcolor) became mode dropdowns
|
||||||
// value in the json means "custom color": map it to mode "other" and move the hex
|
// (default|defaultbackgroundcolor|color1|color2|color3|other) with a <key>custom
|
||||||
// into the <key>custom child, so the variant default stays valid for the dropdown.
|
// colorpicker child. A legacy HEX value in the json means "custom color": map it
|
||||||
// A legacy mode "primary"/"secondary" (old 4-way group textcolor dropdown) maps to
|
// to mode "other" and move the hex into the <key>custom child, so the variant
|
||||||
// "color1"/"color2".
|
// default stays valid for the dropdown. A legacy mode "primary"/"secondary"
|
||||||
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor'];
|
// (old 4-way textcolor dropdown) maps to "color1"/"color2".
|
||||||
|
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor'];
|
||||||
$colorChooserLegacyModes = ['primary' => 'color1', 'secondary' => 'color2'];
|
$colorChooserLegacyModes = ['primary' => 'color1', 'secondary' => 'color2'];
|
||||||
foreach ($colorChooserKeys as $ck) {
|
foreach ($colorChooserKeys as $ck) {
|
||||||
if (isset($definition['options'][$ck])
|
if (isset($definition['options'][$ck])
|
||||||
|
|
@ -295,8 +296,10 @@ foreach ($colorChooserKeys as $ck) {
|
||||||
// --- Row 157 migration: the old <el>fontweight json keys (400|700) became
|
// --- Row 157 migration: the old <el>fontweight json keys (400|700) became
|
||||||
// <el>fontoptions (normal|bold|italic|bolditalic); map the old values and remove
|
// <el>fontoptions (normal|bold|italic|bolditalic); map the old values and remove
|
||||||
// the old keys so the unknown-key check below does not fail on them.
|
// the old keys so the unknown-key check below does not fail on them.
|
||||||
|
// Row 180 plan P2: questiontitle joined (questiontitlefontweight ->
|
||||||
|
// questiontitlefontoptions).
|
||||||
$fontWeightToOptions = ['400' => 'normal', '700' => 'bold'];
|
$fontWeightToOptions = ['400' => 'normal', '700' => 'bold'];
|
||||||
foreach (['grouptitle', 'groupdescription'] as $el) {
|
foreach (['grouptitle', 'groupdescription', 'questiontitle'] as $el) {
|
||||||
$oldKey = $el . 'fontweight';
|
$oldKey = $el . 'fontweight';
|
||||||
if (isset($definition['options'][$oldKey])) {
|
if (isset($definition['options'][$oldKey])) {
|
||||||
$w = (string) $definition['options'][$oldKey];
|
$w = (string) $definition['options'][$oldKey];
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<version>3.3.0</version>
|
<version>3.3.0</version>
|
||||||
<apiVersion>3</apiVersion>
|
<apiVersion>3</apiVersion>
|
||||||
<description><strong>Example variant of Respondage Vanilla</strong><br>Public example of a build output: only a few house-style option values differ, all views, CSS and JS are inherited from the mother theme via extends.</description>
|
<description><strong>Example variant of Respondage Vanilla</strong><br>Public example of a build output: only a few house-style option values differ, all views, CSS and JS are inherited from the mother theme via extends.</description>
|
||||||
<lastUpdate>2026-11-29 13:20:28</lastUpdate>
|
<lastUpdate>2026-11-29 13:44:56</lastUpdate>
|
||||||
<extends>vanilla_respondage</extends>
|
<extends>vanilla_respondage</extends>
|
||||||
</metadata>
|
</metadata>
|
||||||
<compatibility>
|
<compatibility>
|
||||||
|
|
@ -167,7 +167,8 @@
|
||||||
"Default background color", "Color 1", "Color 2", "Color 3",
|
"Default background color", "Color 1", "Color 2", "Color 3",
|
||||||
"Other ..." — options.js appends each entry's live hexcode in brackets
|
"Other ..." — options.js appends each entry's live hexcode in brackets
|
||||||
(for "Other ..." the custom color's hex) and bolds the default. -->
|
(for "Other ..." the custom color's hex) and bolds the default. -->
|
||||||
<navbarfontcolor type="dropdown" category="Header" width="4" 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 ...">other<dropdownoptions><option value="default" data-default="1">[Default font color]</option><option value="defaultbackgroundcolor">Default background color</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></navbarfontcolor>
|
<navbarfontcolor type="dropdown" category="Header" width="4" 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><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></navbarfontcolor>
|
||||||
<navbarfontcolorcustom type="colorpicker" category="Header" width="4" title="Custom text color in header (for 'Other ...')" parent="navbarfontcolor">#444444</navbarfontcolorcustom>
|
<navbarfontcolorcustom type="colorpicker" category="Header" width="4" title="Custom text color in header (for 'Other ...')" parent="navbarfontcolor">#444444</navbarfontcolorcustom>
|
||||||
<!-- Color choosers of the Header tab (rows 115/135/149): HOUSE-STYLE colors, set per
|
<!-- Color choosers of the Header tab (rows 115/135/149): HOUSE-STYLE colors, set per
|
||||||
variant via variants/<client>.json. sliderhandlecolor + privacybackgroundcolor remain in
|
variant via variants/<client>.json. sliderhandlecolor + privacybackgroundcolor remain in
|
||||||
|
|
@ -185,8 +186,9 @@
|
||||||
carries the [ ] marker of that option's own default. A legacy stored HEX
|
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
|
value migrates client-side to mode "other" + hex into the <key>custom
|
||||||
child (options.js colorModeUI), and the views accept a raw hex directly. -->
|
child (options.js colorModeUI), and the views accept a raw hex directly. -->
|
||||||
<headerbackgroundcolor type="dropdown" category="Header" width="4" 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 ...">other<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor" data-default="1">[Default background color]</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></headerbackgroundcolor>
|
<headerbackgroundcolor type="dropdown" category="Header" width="4" 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
|
||||||
<headerbackgroundcolorcustom type="colorpicker" category="Header" width="4" title="Custom header background color (for 'Other ...')" parent="headerbackgroundcolor">#eeeeee</headerbackgroundcolorcustom>
|
<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor" data-default="1">[Default background color]</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></headerbackgroundcolor>
|
||||||
|
<headerbackgroundcolorcustom type="colorpicker" category="Header" width="4" title="Custom header background color (for 'Other ...')" parent="headerbackgroundcolor">#ffffff</headerbackgroundcolorcustom>
|
||||||
<!-- Header sticky per screen size (shown in the "Header" tab).
|
<!-- Header sticky per screen size (shown in the "Header" tab).
|
||||||
Breakpoints are Bootstrap's default ones: phone < md (768px),
|
Breakpoints are Bootstrap's default ones: phone < md (768px),
|
||||||
tablet = md..lg (768-991px), computer >= lg (992px). nav_bar.twig no
|
tablet = md..lg (768-991px), computer >= lg (992px). nav_bar.twig no
|
||||||
|
|
@ -222,18 +224,18 @@
|
||||||
The old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, the shared
|
The old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, the shared
|
||||||
logotopmargin) were removed; variants/build.php maps the variant json's
|
logotopmargin) were removed; variants/build.php maps the variant json's
|
||||||
old keys onto these new keys. -->
|
old keys onto these new keys. -->
|
||||||
<brandlogofile type="imagefile" category="Header" width="4" title="Logo file (left)">./files/logo.png</brandlogofile>
|
<brandlogofile type="imagefile" category="Header" width="4" title="Logo file (left)">./files/logo-left.png</brandlogofile>
|
||||||
<brandlogotopmargin type="text" category="Header" width="4" title="Margin between logo and top of screen (left), in px (0-100)">15</brandlogotopmargin>
|
<brandlogotopmargin type="text" category="Header" width="4" title="Margin between logo and top of screen (left), in px (0-100)">30</brandlogotopmargin>
|
||||||
<brandshowoncomputer type="checkbox" category="Header" width="4" title="Computer screen">on</brandshowoncomputer>
|
<brandshowoncomputer type="checkbox" category="Header" width="4" title="Computer screen">on</brandshowoncomputer>
|
||||||
<brandshowontablet type="checkbox" category="Header" width="4" title="Tablet">on</brandshowontablet>
|
<brandshowontablet type="checkbox" category="Header" width="4" title="Tablet">on</brandshowontablet>
|
||||||
<brandshowonmobile type="checkbox" category="Header" width="4" title="Mobile phone">off</brandshowonmobile>
|
<brandshowonmobile type="checkbox" category="Header" width="4" title="Mobile phone">off</brandshowonmobile>
|
||||||
<centerlogofile type="imagefile" category="Header" width="4" title="Logo file (center)">off</centerlogofile>
|
<centerlogofile type="imagefile" category="Header" width="4" title="Logo file (center)">./files/logo.png</centerlogofile>
|
||||||
<centerlogotopmargin type="text" category="Header" width="4" title="Margin between logo and top of screen (center), in px (0-100)">15</centerlogotopmargin>
|
<centerlogotopmargin type="text" category="Header" width="4" title="Margin between logo and top of screen (center), in px (0-100)">30</centerlogotopmargin>
|
||||||
<centershowoncomputer type="checkbox" category="Header" width="4" title="Computer screen">on</centershowoncomputer>
|
<centershowoncomputer type="checkbox" category="Header" width="4" title="Computer screen">on</centershowoncomputer>
|
||||||
<centershowontablet type="checkbox" category="Header" width="4" title="Tablet">on</centershowontablet>
|
<centershowontablet type="checkbox" category="Header" width="4" title="Tablet">on</centershowontablet>
|
||||||
<centershowonmobile type="checkbox" category="Header" width="4" title="Mobile phone">off</centershowonmobile>
|
<centershowonmobile type="checkbox" category="Header" width="4" title="Mobile phone">off</centershowonmobile>
|
||||||
<rightlogofile type="imagefile" category="Header" width="4" title="Logo file (right)">off</rightlogofile>
|
<rightlogofile type="imagefile" category="Header" width="4" title="Logo file (right)">./files/logo-right.png</rightlogofile>
|
||||||
<rightlogotopmargin type="text" category="Header" width="4" title="Margin between logo and top of screen (right), in px (0-100)">15</rightlogotopmargin>
|
<rightlogotopmargin type="text" category="Header" width="4" title="Margin between logo and top of screen (right), in px (0-100)">30</rightlogotopmargin>
|
||||||
<rightshowoncomputer type="checkbox" category="Header" width="4" title="Computer screen">on</rightshowoncomputer>
|
<rightshowoncomputer type="checkbox" category="Header" width="4" title="Computer screen">on</rightshowoncomputer>
|
||||||
<rightshowontablet type="checkbox" category="Header" width="4" title="Tablet">on</rightshowontablet>
|
<rightshowontablet type="checkbox" category="Header" width="4" title="Tablet">on</rightshowontablet>
|
||||||
<rightshowonmobile type="checkbox" category="Header" width="4" title="Mobile phone">off</rightshowonmobile>
|
<rightshowonmobile type="checkbox" category="Header" width="4" title="Mobile phone">off</rightshowonmobile>
|
||||||
|
|
@ -247,11 +249,14 @@
|
||||||
background = COLUMN 2, progress font color = COLUMN 3 (with an extra tip
|
background = COLUMN 2, progress font color = COLUMN 3 (with an extra tip
|
||||||
underneath). Defaults: progress bar color = Color 1, progress background =
|
underneath). Defaults: progress bar color = Color 1, progress background =
|
||||||
Default background color, progress font color = Default font color. -->
|
Default background color, progress font color = Default font color. -->
|
||||||
<progressbarcolor type="dropdown" category="Header" width="4" 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 ...">other<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor">Default background color</option><option value="color1" data-default="1">[Color 1]</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></progressbarcolor>
|
<progressbarcolor type="dropdown" category="Header" width="4" 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><option value="color1" data-default="1">[Color 1]</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></progressbarcolor>
|
||||||
<progressbarcolorcustom type="colorpicker" category="Header" width="4" title="Custom progress bar color (for 'Other ...')" parent="progressbarcolor">#5e1c64</progressbarcolorcustom>
|
<progressbarcolorcustom type="colorpicker" category="Header" width="4" title="Custom progress bar color (for 'Other ...')" parent="progressbarcolor">#5e1c64</progressbarcolorcustom>
|
||||||
<progressbarbackgroundcolor type="dropdown" category="Header" width="4" 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 ...">other<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor" data-default="1">[Default background color]</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></progressbarbackgroundcolor>
|
<progressbarbackgroundcolor type="dropdown" category="Header" width="4" 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><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></progressbarbackgroundcolor>
|
||||||
<progressbarbackgroundcolorcustom type="colorpicker" category="Header" width="4" title="Custom progress bar background color (for 'Other ...')" parent="progressbarbackgroundcolor">#eeeeee</progressbarbackgroundcolorcustom>
|
<progressbarbackgroundcolorcustom type="colorpicker" category="Header" width="4" title="Custom progress bar background color (for 'Other ...')" parent="progressbarbackgroundcolor">#eeeeee</progressbarbackgroundcolorcustom>
|
||||||
<progressbarfontcolor type="dropdown" category="Header" width="4" 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 ...">other<dropdownoptions><option value="default" data-default="1">[Default font color]</option><option value="defaultbackgroundcolor">Default background color</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></progressbarfontcolor>
|
<progressbarfontcolor type="dropdown" category="Header" width="4" 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><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></progressbarfontcolor>
|
||||||
<progressbarfontcolorcustom type="colorpicker" category="Header" width="4" title="Custom progress bar font color (for 'Other ...')" parent="progressbarfontcolor">#ffffff</progressbarfontcolorcustom>
|
<progressbarfontcolorcustom type="colorpicker" category="Header" width="4" title="Custom progress bar font color (for 'Other ...')" parent="progressbarfontcolor">#ffffff</progressbarfontcolorcustom>
|
||||||
<!-- Page background tab (options.twig tab 3, aImagesPaneKeys order): overall background color (chooser + custom), then the background image on/off + its detail options. -->
|
<!-- Page background tab (options.twig tab 3, aImagesPaneKeys order): overall background color (chooser + custom), then the background image on/off + its detail options. -->
|
||||||
<!-- Row 149: the overall background color is a color-chooser dropdown like the
|
<!-- Row 149: the overall background color is a color-chooser dropdown like the
|
||||||
|
|
@ -261,8 +266,9 @@
|
||||||
"other" + hex into bodybackgroundcolorcustom (options.js), and
|
"other" + hex into bodybackgroundcolorcustom (options.js), and
|
||||||
custom_header.twig resolves the mode via the cm() macro (a raw hex still
|
custom_header.twig resolves the mode via the cm() macro (a raw hex still
|
||||||
passes through directly). -->
|
passes through directly). -->
|
||||||
<bodybackgroundcolor type="dropdown" category="Page background" width="6" 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 ...">other<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor" data-default="1">[Default background color]</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></bodybackgroundcolor>
|
<bodybackgroundcolor type="dropdown" category="Page background" width="6" 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
|
||||||
<bodybackgroundcolorcustom type="colorpicker" category="Page background" width="6" title="Custom overall background color (for 'Other ...')" parent="bodybackgroundcolor">#dddddd</bodybackgroundcolorcustom>
|
<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor" data-default="1">[Default background color]</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></bodybackgroundcolor>
|
||||||
|
<bodybackgroundcolorcustom type="colorpicker" category="Page background" width="6" title="Custom overall background color (for 'Other ...')" parent="bodybackgroundcolor">#ffffff</bodybackgroundcolorcustom>
|
||||||
<!-- Prompt Q: order fixed — Background image, then Overall background color
|
<!-- Prompt Q: order fixed — Background image, then Overall background color
|
||||||
(always relevant), then the three image-detail options which are only
|
(always relevant), then the three image-detail options which are only
|
||||||
relevant when a background image is shown (parent="backgroundimage",
|
relevant when a background image is shown (parent="backgroundimage",
|
||||||
|
|
@ -312,25 +318,50 @@
|
||||||
Previous/Next/Submit buttons). NOT house-style (structural). -->
|
Previous/Next/Submit buttons). NOT house-style (structural). -->
|
||||||
<questiondistance type="text" category="Questions" width="6" title="Distance between two questions (px or rem)">30px</questiondistance>
|
<questiondistance type="text" category="Questions" width="6" title="Distance between two questions (px or rem)">30px</questiondistance>
|
||||||
<questiondistancebottom type="text" category="Questions" width="6" title="Distance between last question and buttons at bottom of page (px or rem)">30px</questiondistancebottom>
|
<questiondistancebottom type="text" category="Questions" width="6" title="Distance between last question and buttons at bottom of page (px or rem)">30px</questiondistancebottom>
|
||||||
|
<!-- Row 178 plan P2: section "Question title and body" (options.twig) — three
|
||||||
|
col-md-4 columns (width 4). Col 1 = Font chooser / color chooser for the question
|
||||||
|
title (fontselect + 6-way text-color mode + custom + size + font options), plus
|
||||||
|
the legacy plain font-color picker. Col 2 = title background color chooser
|
||||||
|
(default mode color1 = Color 1). Col 3 = question body background color chooser
|
||||||
|
(default mode defaultbackgroundcolor). A "chooser" = 6-way mode dropdown +
|
||||||
|
"Other ..." custom colorpicker child, exactly like the Groups tab text colors /
|
||||||
|
Header background color. In the views (custom_header.twig) the CHOOSER wins;
|
||||||
|
questiontitlefontcolor stays visible as a legacy picker. HOUSE-STYLE: the color
|
||||||
|
defaults below are house-style specific (set per variant json; build.php migrates
|
||||||
|
legacy hex/mode values). -->
|
||||||
|
<questiontitlefont type="fontselect" category="Questions" width="4" title="Font for question titles">base</questiontitlefont>
|
||||||
|
<questiontitletextcolor type="dropdown" category="Questions" width="4" title="Text color for question titles" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">other
|
||||||
|
<dropdownoptions><option value="default">Default font color</option><option value="defaultbackgroundcolor">Default background color</option><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other" data-default="1">[Other ...]</option></dropdownoptions></questiontitletextcolor>
|
||||||
|
<questiontitletextcolorcustom type="colorpicker" category="Questions" width="4" title="Custom text color for question titles (for 'Other ...')" parent="questiontitletextcolor">#ffffff</questiontitletextcolorcustom>
|
||||||
|
<questiontitlefontsize type="buttons" category="Questions" width="4" 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>
|
||||||
|
<questiontitlefontoptions type="buttons" category="Questions" width="4" title="Question title font options" options="normal|bold|italic|bolditalic" optionlabels="Normal|Bold|Italic|Bold italic">bold</questiontitlefontoptions>
|
||||||
|
<questiontitlefontcolor type="colorpicker" category="Questions" width="4" title="Text color for question titles (legacy picker)" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
||||||
|
<questiontitlebackgroundcolor type="dropdown" category="Questions" width="4" title="Question title background 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><option value="color1" data-default="1">[Color 1]</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></questiontitlebackgroundcolor>
|
||||||
|
<questiontitlebackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question title background color (for 'Other ...')" parent="questiontitlebackgroundcolor">#5e1c64</questiontitlebackgroundcolorcustom>
|
||||||
|
<questionbackgroundcolor type="dropdown" category="Questions" width="4" title="Question body 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><option value="color1">Color 1</option><option value="color2">Color 2</option><option value="color3">Color 3</option><option value="other">Other ...</option></dropdownoptions></questionbackgroundcolor>
|
||||||
|
<questionbackgroundcolorcustom type="colorpicker" category="Questions" width="4" title="Custom question body background color (for 'Other ...')" parent="questionbackgroundcolor">#ffffff</questionbackgroundcolorcustom>
|
||||||
<!-- Questions
|
<!-- Questions
|
||||||
HOUSE-STYLE: the colorpicker options in this section (question
|
HOUSE-STYLE: the colorpicker options in this section (question
|
||||||
title/background/help/help-font/border/checkbox colors) are house-style
|
title/background/help/help-font/border/checkbox colors) are house-style
|
||||||
colors. NOT house-style (structural, same for all variants):
|
colors. NOT house-style (structural, same for all variants):
|
||||||
questionborder, questionborderstyle, the borderradius values,
|
questionborder, questionborderstyle, the borderradius values,
|
||||||
questiondropdown and questionhelptextposition.
|
questiondropdown and questionhelptextposition.
|
||||||
Prompt R: order = the three columns of the Questions tab (options.twig
|
Row 178/179 plan: order = the sections of the Questions tab as rendered by
|
||||||
renders them in this order): col1 colors+help, col2 border + its
|
options.twig (aQSections/aQSlots): first the "Overall question" section
|
||||||
conditional children, col3 checkbox color. All width=12 — inside the
|
(width 6 = the single col-md-6), then the "Question title and body"
|
||||||
pane each option stacks as col-12 in its column. The border children
|
section (three col-md-4 columns, width 4): col1 title font chooser/color
|
||||||
|
chooser + legacy picker, col2 title background chooser, col3 body
|
||||||
|
background chooser; then the remaining legacy columns (help, border,
|
||||||
|
checkbox color), then the rest full-width (width 12). Inside a pane
|
||||||
|
column each option stacks as col-12. The border children
|
||||||
carry parent="questionborder"; the show-values "box|top" cannot be an
|
carry parent="questionborder"; the show-values "box|top" cannot be an
|
||||||
XML attribute (core passes only `parent` through), so the multi-value
|
XML attribute (core passes only `parent` through), so the multi-value
|
||||||
list lives in options.twig (aShowIfValues) and lands as
|
list lives in options.twig (aShowIfValues) and lands as
|
||||||
data-show-if-value="box|top". questionhelpfontcolor (NEW) is applied
|
data-show-if-value="box|top". questionhelpfontcolor is applied
|
||||||
in custom_header.twig on .question-help-container. -->
|
in custom_header.twig on .question-help-container. -->
|
||||||
<!-- Questions -->
|
<!-- Questions -->
|
||||||
<questiontitlebackgroundcolor type="colorpicker" category="Questions" width="4" title="Question title background color" options="on|off" optionlabels="Yes|No">#5e1c64</questiontitlebackgroundcolor>
|
|
||||||
<questiontitlefontcolor type="colorpicker" category="Questions" width="4" title="Question title font color" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
|
||||||
<questionbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question background color (not title)" options="on|off" optionlabels="Yes|No">#ffffff</questionbackgroundcolor>
|
|
||||||
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="4" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
||||||
<questionhelpfontcolor type="colorpicker" category="Questions" width="4" title="Question help font color" options="on|off" optionlabels="Yes|No">#444444</questionhelpfontcolor>
|
<questionhelpfontcolor type="colorpicker" category="Questions" width="4" title="Question help font color" options="on|off" optionlabels="Yes|No">#444444</questionhelpfontcolor>
|
||||||
<questionhelptextposition type="buttons" category="Questions" width="4" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
<questionhelptextposition type="buttons" category="Questions" width="4" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
||||||
|
|
@ -343,7 +374,8 @@
|
||||||
<questionborderradiusBL type="duration" category="Questions" width="4" title="Border radius bottom left" parent="questionborder">5px</questionborderradiusBL>
|
<questionborderradiusBL type="duration" category="Questions" width="4" title="Border radius bottom left" parent="questionborder">5px</questionborderradiusBL>
|
||||||
<questionborderradiusBR type="duration" category="Questions" width="4" title="Border radius bottom right" parent="questionborder">5px</questionborderradiusBR>
|
<questionborderradiusBR type="duration" category="Questions" width="4" title="Border radius bottom right" parent="questionborder">5px</questionborderradiusBR>
|
||||||
<checkboxcolor type="colorpicker" category="Questions" width="4" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
|
<checkboxcolor type="colorpicker" category="Questions" width="4" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
|
||||||
<!-- Per-element font+color combos (Prompt U). Each element gets:
|
<!-- Per-element font+color combos (Prompt U; row 178 plan P3/P6 move the
|
||||||
|
answers/buttons ones into their own sections/tab). Each element gets:
|
||||||
- <el>font (type "fontselect"): the SAME choices as the base "font"
|
- <el>font (type "fontselect"): the SAME choices as the base "font"
|
||||||
dropdown above (bundled + variant-custom + browser fonts), plus a
|
dropdown above (bundled + variant-custom + browser fonts), plus a
|
||||||
first option "Same as base font" (value "base" = no extra class, the
|
first option "Same as base font" (value "base" = no extra class, the
|
||||||
|
|
@ -355,10 +387,6 @@
|
||||||
color fontcolor). Resolved to an inline style="color: …" in the views.
|
color fontcolor). Resolved to an inline style="color: …" in the views.
|
||||||
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
|
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
|
||||||
= "other" (parent show-value "other"). -->
|
= "other" (parent show-value "other"). -->
|
||||||
<questiontitlefont type="fontselect" category="Questions" width="12" title="Font for question titles">base</questiontitlefont>
|
|
||||||
<questiontitletextcolor type="dropdown" category="Questions" width="12" title="Text color for question titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
|
||||||
<dropdownoptions><option value="default" data-default="1">[Default font color]</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></questiontitletextcolor>
|
|
||||||
<questiontitletextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for question titles" parent="questiontitletextcolor">#444444</questiontitletextcolorcustom>
|
|
||||||
<answersfont type="fontselect" category="Questions" width="12" title="Font for answers and help texts">base</answersfont>
|
<answersfont type="fontselect" category="Questions" width="12" title="Font for answers and help texts">base</answersfont>
|
||||||
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
<dropdownoptions><option value="default" data-default="1">[Default font color]</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></answerstextcolor>
|
<dropdownoptions><option value="default" data-default="1">[Default font color]</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></answerstextcolor>
|
||||||
|
|
@ -367,8 +395,6 @@
|
||||||
<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
|
<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><option value="default" data-default="1">[Default font color]</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></buttonstextcolor>
|
<dropdownoptions><option value="default" data-default="1">[Default font color]</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></buttonstextcolor>
|
||||||
<buttonstextcolorcustom type="colorpicker" category="Questions" width="12" title="Custom text color for the buttons (Previous/Next/Submit)" parent="buttonstextcolor">#444444</buttonstextcolorcustom>
|
<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="12" 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="12" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
|
||||||
<!-- Colors: no tab in the custom options page yet (Prompt T) — these two stay in core mode only. -->
|
<!-- Colors: no tab in the custom options page yet (Prompt T) — these two stay in core mode only. -->
|
||||||
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
|
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
|
||||||
<privacybackgroundcolor type="colorpicker" category="Colors" width="12" title="Privacy background color" options="on|off" optionlabels="Yes|No">lightyellow</privacybackgroundcolor>
|
<privacybackgroundcolor type="colorpicker" category="Colors" width="12" title="Privacy background color" options="on|off" optionlabels="Yes|No">lightyellow</privacybackgroundcolor>
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,11 @@
|
||||||
headerbackgroundcolor, the progress bar colors and bodybackgroundcolor below
|
headerbackgroundcolor, the progress bar colors and bodybackgroundcolor below
|
||||||
(navbarfontcolor keeps its own inline expression further down). Modes: default|defaultbackgroundcolor|
|
(navbarfontcolor keeps its own inline expression further down). Modes: default|defaultbackgroundcolor|
|
||||||
color1|color2|color3|other, or a raw hex (legacy stored value) which passes
|
color1|color2|color3|other, or a raw hex (legacy stored value) which passes
|
||||||
through directly. #}
|
through directly. Row 180 / plan P2: legacy modes "primary"/"secondary" of the
|
||||||
|
old 4-way <el>textcolor dropdowns map to color1/color2 as well. #}
|
||||||
{% macro cm(mode, custom, opts) -%}
|
{% macro cm(mode, custom, opts) -%}
|
||||||
{%- set m = mode|default('') -%}
|
{%- set m = mode|default('') -%}
|
||||||
{{- m matches '/^#[0-9a-fA-F]{3,8}$/' ? m : (m == 'color1' ? opts.primarycolor|default('') : (m == 'color2' ? opts.secondarycolor|default('') : (m == 'color3' ? opts.tertiarycolor|default('') : (m == 'defaultbackgroundcolor' ? opts.defaultbackgroundcolor|default('') : (m == 'other' ? custom|default('') : opts.fontcolor|default('')))))) -}}
|
{{- m matches '/^#[0-9a-fA-F]{3,8}$/' ? m : (m == 'color1' or m == 'primary' ? opts.primarycolor|default('') : (m == 'color2' or m == 'secondary' ? opts.secondarycolor|default('') : (m == 'color3' ? opts.tertiarycolor|default('') : (m == 'defaultbackgroundcolor' ? opts.defaultbackgroundcolor|default('') : (m == 'other' ? custom|default('') : opts.fontcolor|default('')))))) -}}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
{% import _self as cmm %}
|
{% import _self as cmm %}
|
||||||
|
|
||||||
|
|
@ -56,11 +57,25 @@
|
||||||
color: {{ aSurveyInfo.options.fontcolor }};
|
color: {{ aSurveyInfo.options.fontcolor }};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{# Row 180 / plan P2: the question title now uses the color-chooser scheme —
|
||||||
|
questiontitletextcolor + questiontitletextcolorcustom (text) and
|
||||||
|
questiontitlebackgroundcolor + questiontitlebackgroundcolorcustom
|
||||||
|
(background), resolved via cm() (default modes: text "other" per row 178,
|
||||||
|
background "color1"; legacy stored hex passes through). The CHOOSER wins
|
||||||
|
when the mode key exists in the stored options; a row from before P2 (no
|
||||||
|
questiontitletextcolor key) falls back to the legacy plain picker
|
||||||
|
questiontitlefontcolor. questiontitlefontoptions (normal|bold|italic|
|
||||||
|
bolditalic) replaces questiontitlefontweight (400|700) — a legacy stored
|
||||||
|
weight is mapped like the group title/description (row 157). #}
|
||||||
|
{% set sQTitleFontOptions = aSurveyInfo.options.questiontitlefontoptions|default(aSurveyInfo.options.questiontitlefontweight|default('700') == '700' ? 'bold' : 'normal') %}
|
||||||
|
{% set sQTitleBackgroundColor = cmm.cm(aSurveyInfo.options.questiontitlebackgroundcolor|default('color1'), aSurveyInfo.options.questiontitlebackgroundcolorcustom|default(''), aSurveyInfo.options) %}
|
||||||
|
{% set sQTitleTextColor = aSurveyInfo.options.questiontitletextcolor is defined ? cmm.cm(aSurveyInfo.options.questiontitletextcolor, aSurveyInfo.options.questiontitletextcolorcustom|default(''), aSurveyInfo.options) : aSurveyInfo.options.questiontitlefontcolor|default('') %}
|
||||||
.question-title-container {
|
.question-title-container {
|
||||||
font-size: {{ aSurveyInfo.options.questiontitlefontsize }};
|
font-size: {{ aSurveyInfo.options.questiontitlefontsize }};
|
||||||
font-weight: {{ aSurveyInfo.options.questiontitlefontweight }};
|
font-weight: {{ sQTitleFontOptions == 'bold' or sQTitleFontOptions == 'bolditalic' ? '700' : '400' }};
|
||||||
background: {{ aSurveyInfo.options.questiontitlebackgroundcolor }};
|
font-style: {{ sQTitleFontOptions == 'italic' or sQTitleFontOptions == 'bolditalic' ? 'italic' : 'normal' }};
|
||||||
color: {{ aSurveyInfo.options.questiontitlefontcolor }};
|
background: {{ sQTitleBackgroundColor }};
|
||||||
|
color: {{ sQTitleTextColor }};
|
||||||
}
|
}
|
||||||
|
|
||||||
{# Row 157: group title/description font OPTIONS (config.xml <el>fontoptions:
|
{# Row 157: group title/description font OPTIONS (config.xml <el>fontoptions:
|
||||||
|
|
@ -271,8 +286,12 @@
|
||||||
color: {{ sProgressBarFontColor }};
|
color: {{ sProgressBarFontColor }};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{# Row 180 / plan P2: the question body background is a color chooser now
|
||||||
|
(questionbackgroundcolor, default mode "defaultbackgroundcolor", +
|
||||||
|
questionbackgroundcolorcustom for "other"); a legacy stored hex passes
|
||||||
|
through cm() directly. #}
|
||||||
.question-container, #welcome-container {
|
.question-container, #welcome-container {
|
||||||
background: {{ aSurveyInfo.options.questionbackgroundcolor }};
|
background: {{ cmm.cm(aSurveyInfo.options.questionbackgroundcolor|default('defaultbackgroundcolor'), aSurveyInfo.options.questionbackgroundcolorcustom|default(''), aSurveyInfo.options) }};
|
||||||
}
|
}
|
||||||
|
|
||||||
.question-help-container, .question-valid-container {
|
.question-help-container, .question-valid-container {
|
||||||
|
|
@ -289,8 +308,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-primary{
|
.bg-primary{
|
||||||
background-color: {{ aSurveyInfo.options.questiontitlebackgroundcolor }};
|
background-color: {{ sQTitleBackgroundColor }};
|
||||||
color: {{ aSurveyInfo.options.questiontitlefontcolor }};
|
color: {{ sQTitleTextColor }};
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover, .btn-primary:focus {
|
.btn-primary:hover, .btn-primary:focus {
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,16 @@
|
||||||
"questiontitlefont", type fontselect). "base" = same as the base font: no extra
|
"questiontitlefont", type fontselect). "base" = same as the base font: no extra
|
||||||
class, the element inherits the body font. #}
|
class, the element inherits the body font. #}
|
||||||
{% set sQuestionTitleFont = aSurveyInfo.options.questiontitlefont|default('base') %}
|
{% set sQuestionTitleFont = aSurveyInfo.options.questiontitlefont|default('base') %}
|
||||||
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
{# Prompt U / row 180 plan P2: per-element text color — now the 6-way color-chooser
|
||||||
primarycolor, secondary -> secondarycolor, other -> questiontitletextcolorcustom.
|
scheme (default|defaultbackgroundcolor|color1|color2|color3|other) with
|
||||||
Emitted as an inline style on the element below. #}
|
questiontitletextcolorcustom for "other". Legacy modes of the old 4-way dropdown
|
||||||
{% set sQuestionTitleTextColorMode = aSurveyInfo.options.questiontitletextcolor|default('default') %}
|
(primary|secondary) map to color1/color2, a raw hex passes through. When the
|
||||||
{% set sQuestionTitleTextColor = sQuestionTitleTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sQuestionTitleTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sQuestionTitleTextColorMode == 'other' ? aSurveyInfo.options.questiontitletextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
mode key is absent entirely (row from before Prompt U) no inline style is
|
||||||
|
emitted here — custom_header.twig then falls back to the legacy plain picker
|
||||||
|
questiontitlefontcolor. Emitted as an inline style on the element below. #}
|
||||||
|
{% set sQuestionTitleTextColorMode = aSurveyInfo.options.questiontitletextcolor is defined ? aSurveyInfo.options.questiontitletextcolor : '' %}
|
||||||
|
{% set oQ = aSurveyInfo.options %}
|
||||||
|
{% set sQuestionTitleTextColor = sQuestionTitleTextColorMode == '' ? '' : (sQuestionTitleTextColorMode matches '/^#[0-9a-fA-F]{3,8}$/' ? sQuestionTitleTextColorMode : (sQuestionTitleTextColorMode == 'color1' or sQuestionTitleTextColorMode == 'primary' ? oQ.primarycolor|default('') : (sQuestionTitleTextColorMode == 'color2' or sQuestionTitleTextColorMode == 'secondary' ? oQ.secondarycolor|default('') : (sQuestionTitleTextColorMode == 'color3' ? oQ.tertiarycolor|default('') : (sQuestionTitleTextColorMode == 'defaultbackgroundcolor' ? oQ.defaultbackgroundcolor|default('') : (sQuestionTitleTextColorMode == 'other' ? oQ.questiontitletextcolorcustom|default('') : oQ.fontcolor|default(''))))))) %}
|
||||||
|
|
||||||
<!-- Question text -->
|
<!-- Question text -->
|
||||||
<div class="{{ aSurveyInfo.class.questiontitlecontainer }} col-12 {% if sQuestionTitleFont != 'base' %}font-{{ sQuestionTitleFont }}{% endif %}" {% if sQuestionTitleTextColor != '' %}style="color: {{ sQuestionTitleTextColor }};"{% endif %} {{ aSurveyInfo.attr.questiontitlecontainer }} >
|
<div class="{{ aSurveyInfo.class.questiontitlecontainer }} col-12 {% if sQuestionTitleFont != 'base' %}font-{{ sQuestionTitleFont }}{% endif %}" {% if sQuestionTitleTextColor != '' %}style="color: {{ sQuestionTitleTextColor }};"{% endif %} {{ aSurveyInfo.attr.questiontitlecontainer }} >
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue