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:
parent
1085c5d132
commit
e061f7c0f3
3 changed files with 77 additions and 40 deletions
|
|
@ -26,7 +26,9 @@
|
|||
primarycolor, secondary -> secondarycolor, other -> answerstextcolorcustom.
|
||||
Emitted as an inline style on the element below. #}
|
||||
{% set sAnswersTextColorMode = aSurveyInfo.options.answerstextcolor|default('default') %}
|
||||
{% set sAnswersTextColor = sAnswersTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sAnswersTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sAnswersTextColorMode == 'other' ? aSurveyInfo.options.answerstextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||
{# row 184 / plan P3: 6-way color-chooser scheme (default|defaultbackgroundcolor|color1|color2|color3|other) + legacy modes primary/secondary and raw hex passthrough #}
|
||||
{% set oA = aSurveyInfo.options %}
|
||||
{% set sAnswersTextColor = sAnswersTextColorMode matches '/^#[0-9a-fA-F]{3,8}$/' ? sAnswersTextColorMode : (sAnswersTextColorMode == 'color1' or sAnswersTextColorMode == 'primary' ? oA.primarycolor|default('') : (sAnswersTextColorMode == 'color2' or sAnswersTextColorMode == 'secondary' ? oA.secondarycolor|default('') : (sAnswersTextColorMode == 'color3' ? oA.tertiarycolor|default('') : (sAnswersTextColorMode == 'defaultbackgroundcolor' ? oA.defaultbackgroundcolor|default('') : (sAnswersTextColorMode == 'other' ? oA.answerstextcolorcustom|default('') : oA.fontcolor|default('')))))) %}
|
||||
|
||||
<!-- Answer -->
|
||||
<div class="{{ aSurveyInfo.class.answercontainer }} col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {% if sAnswersTextColor != '' %}style="color: {{ sAnswersTextColor }};"{% endif %} {{ aSurveyInfo.attr.answercontainer }}>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@
|
|||
primarycolor, secondary -> secondarycolor, other -> answerstextcolorcustom.
|
||||
Emitted as an inline style on the element below. #}
|
||||
{% set sAnswersTextColorMode = aSurveyInfo.options.answerstextcolor|default('default') %}
|
||||
{% set sAnswersTextColor = sAnswersTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sAnswersTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sAnswersTextColorMode == 'other' ? aSurveyInfo.options.answerstextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||
{# row 184 / plan P3: 6-way color-chooser scheme (default|defaultbackgroundcolor|color1|color2|color3|other) + legacy modes primary/secondary and raw hex passthrough #}
|
||||
{% set oA = aSurveyInfo.options %}
|
||||
{% set sAnswersTextColor = sAnswersTextColorMode matches '/^#[0-9a-fA-F]{3,8}$/' ? sAnswersTextColorMode : (sAnswersTextColorMode == 'color1' or sAnswersTextColorMode == 'primary' ? oA.primarycolor|default('') : (sAnswersTextColorMode == 'color2' or sAnswersTextColorMode == 'secondary' ? oA.secondarycolor|default('') : (sAnswersTextColorMode == 'color3' ? oA.tertiarycolor|default('') : (sAnswersTextColorMode == 'defaultbackgroundcolor' ? oA.defaultbackgroundcolor|default('') : (sAnswersTextColorMode == 'other' ? oA.answerstextcolorcustom|default('') : oA.fontcolor|default('')))))) %}
|
||||
|
||||
<!-- Survey question help -->
|
||||
<div class="{{ aSurveyInfo.class.helpcontainer }} text-info col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {% if sAnswersTextColor != '' %}style="color: {{ sAnswersTextColor }};"{% endif %} {{ aSurveyInfo.attr.helpcontainer }}>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@
|
|||
primarycolor, secondary -> secondarycolor, other -> answerstextcolorcustom.
|
||||
Emitted as an inline style on the element below. #}
|
||||
{% set sAnswersTextColorMode = aSurveyInfo.options.answerstextcolor|default('default') %}
|
||||
{% set sAnswersTextColor = sAnswersTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sAnswersTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sAnswersTextColorMode == 'other' ? aSurveyInfo.options.answerstextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||
{# row 184 / plan P3: 6-way color-chooser scheme (default|defaultbackgroundcolor|color1|color2|color3|other) + legacy modes primary/secondary and raw hex passthrough #}
|
||||
{% set oA = aSurveyInfo.options %}
|
||||
{% set sAnswersTextColor = sAnswersTextColorMode matches '/^#[0-9a-fA-F]{3,8}$/' ? sAnswersTextColorMode : (sAnswersTextColorMode == 'color1' or sAnswersTextColorMode == 'primary' ? oA.primarycolor|default('') : (sAnswersTextColorMode == 'color2' or sAnswersTextColorMode == 'secondary' ? oA.secondarycolor|default('') : (sAnswersTextColorMode == 'color3' ? oA.tertiarycolor|default('') : (sAnswersTextColorMode == 'defaultbackgroundcolor' ? oA.defaultbackgroundcolor|default('') : (sAnswersTextColorMode == 'other' ? oA.answerstextcolorcustom|default('') : oA.fontcolor|default('')))))) %}
|
||||
|
||||
<!-- LimeSurvey valid message and help -->
|
||||
<div class="{{ aSurveyInfo.class.questionvalidcontainer }} text-info col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {% if sAnswersTextColor != '' %}style="color: {{ sAnswersTextColor }};"{% endif %} {{ aSurveyInfo.attr.questionvalidcontainer }}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue