feat(options): Fonts tab becomes 'Fonts and colors' with per-element font+color combos (Prompt U)
Tab 'Fonts' is renamed to 'Fonts and colors' and gets a dedicated layout: top row (col 1: font, fontcolor, fontsize; col 2: primarycolor + new secondarycolor; col 3 empty), an hr, then one combo row per element (header, progressbar, questiontitle, answers, grouptitle, groupdescription, buttons) with col 1 = existing <el>font fontselect, col 2 = new <el>textcolor dropdown (default|primary|secondary|other), col 3 = new <el>textcolorcustom colorpicker, visible only when mode is 'other' (parent show-value via aShowIfValues, server-side initial d-none, options.js updateVisibilityByParent/updateChild now handle select parents, multi-value aware; font's self-parent removed from config.xml). config.xml: fontcolor/primarycolor moved from Colors to Fonts (retitled 'Default font color (body text)' / 'Primary color'), secondarycolor added (default #888888), 14 per-element color keys added with dropdownoptions. Views emit the per-element color as inline style (default->fontcolor, primary->primarycolor, secondary->secondarycolor, other->custom picker). Colors tab now only holds sliderhandlecolor + privacybackgroundcolor (final Colors layout = Prompt T, still open). Variants rebuilt (defensie, erasmus, example respondage_respondage) — no unknown-key failures; theme reset in LS-admin still owner action. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
671fba4aff
commit
9716aac4ee
13 changed files with 386 additions and 110 deletions
114
config.xml
114
config.xml
|
|
@ -194,13 +194,17 @@
|
||||||
|
|
||||||
<!-- Various colors
|
<!-- Various colors
|
||||||
HOUSE-STYLE: ALL colorpickers in this section (header, navbar menu,
|
HOUSE-STYLE: ALL colorpickers in this section (header, navbar menu,
|
||||||
primary, font, slider, progressbar, privacy) are house-style colors
|
slider, progressbar, privacy) are house-style colors and are set per
|
||||||
and are set per variant via variants/<client>.json -->
|
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). -->
|
||||||
<!-- Various colors -->
|
<!-- Various colors -->
|
||||||
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor>
|
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor>
|
||||||
<navbarfontcolor type="colorpicker" category="Colors" width="12" title="Menu item text color in the top bar (should contrast with the header background color)" options="on|off" optionlabels="Yes|No">#444444</navbarfontcolor>
|
<navbarfontcolor type="colorpicker" category="Colors" width="12" title="Menu item text color in the top bar (should contrast with the header background color)" options="on|off" optionlabels="Yes|No">#444444</navbarfontcolor>
|
||||||
<primarycolor type="colorpicker" category="Colors" width="12" title="Primary color (for buttons)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
|
|
||||||
<fontcolor type="colorpicker" category="Colors" width="12" title="Base font color" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
|
|
||||||
<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>
|
||||||
<progressbarbackgroundcolor type="colorpicker" category="Colors" width="12" title="Progress bar background color" options="on|off" optionlabels="Yes|No">#eeeeee</progressbarbackgroundcolor>
|
<progressbarbackgroundcolor type="colorpicker" category="Colors" width="12" title="Progress bar background color" options="on|off" optionlabels="Yes|No">#eeeeee</progressbarbackgroundcolor>
|
||||||
<progressbarcolor type="colorpicker" category="Colors" width="12" title="Progress bar color" options="on|off" optionlabels="Yes|No">#5e1c64</progressbarcolor>
|
<progressbarcolor type="colorpicker" category="Colors" width="12" title="Progress bar color" options="on|off" optionlabels="Yes|No">#5e1c64</progressbarcolor>
|
||||||
|
|
@ -245,7 +249,7 @@
|
||||||
+ the "Bundled open source fonts" optgroup below). -->
|
+ the "Bundled open source fonts" optgroup below). -->
|
||||||
<!-- fonts -->
|
<!-- fonts -->
|
||||||
<!-- When adding new items, please keep fonts ordered alphabetically -->
|
<!-- When adding new items, please keep fonts ordered alphabetically -->
|
||||||
<font type="dropdown" category="Fonts" width="4" title="Default font (body text)" parent="font">noto_sans
|
<font type="dropdown" category="Fonts" width="4" title="Default font (body text)">noto_sans
|
||||||
<dropdownoptions>
|
<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. -->
|
<!-- 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">
|
<optgroup label="Bundled open source fonts">
|
||||||
|
|
@ -275,22 +279,92 @@
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</dropdownoptions>
|
</dropdownoptions>
|
||||||
</font>
|
</font>
|
||||||
<!-- Per-element font overrides (type "fontselect", rendered by options/options.twig):
|
<!-- Prompt U: the "Fonts" tab is rendered as "Fonts and colors" with a special
|
||||||
each dropdown offers the SAME choices as the base "font" dropdown above
|
layout (options.twig): TOP ROW column 1 = font, fontcolor, fontsize;
|
||||||
(bundled + variant-custom + browser fonts), plus a first option
|
column 2 = primarycolor, secondarycolor (both moved here from the Colors
|
||||||
"Same as base font" (value "base" = no extra class, the element simply
|
category); then an <hr>; then per-element combo rows (fontselect +
|
||||||
inherits the body font). The chosen value is applied as the class
|
textcolor dropdown + conditional textcolorcustom picker); then the
|
||||||
font-<value> on the element in the views (nav_bar, progress_bar,
|
size/weight options below. HOUSE-STYLE: fontcolor, primarycolor and
|
||||||
question_text_container, answers, help, group_name, group_desc,
|
secondarycolor are set per variant via variants/<client>.json. -->
|
||||||
navigator). Default "base" for all of them. -->
|
<fontcolor type="colorpicker" category="Fonts" width="12" title="Default font color (body text)" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
|
||||||
<headerfont type="fontselect" category="Fonts" width="4" title="Font for the header / top menu">base</headerfont>
|
|
||||||
<progressbarfont type="fontselect" category="Fonts" width="4" title="Font for the progress bar">base</progressbarfont>
|
|
||||||
<questiontitlefont type="fontselect" category="Fonts" width="4" title="Font for question titles">base</questiontitlefont>
|
|
||||||
<answersfont type="fontselect" category="Fonts" width="4" title="Font for answers and help texts">base</answersfont>
|
|
||||||
<grouptitlefont type="fontselect" category="Fonts" width="4" title="Font for group titles">base</grouptitlefont>
|
|
||||||
<groupdescriptionfont type="fontselect" category="Fonts" width="4" title="Font for group descriptions">base</groupdescriptionfont>
|
|
||||||
<buttonsfont type="fontselect" category="Fonts" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
|
|
||||||
<fontsize type="buttons" category="Fonts" width="12" title="Base font size" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|Extra large (20 px)">16px</fontsize>
|
<fontsize type="buttons" category="Fonts" width="12" title="Base font size" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|Extra large (20 px)">16px</fontsize>
|
||||||
|
<primarycolor type="colorpicker" category="Fonts" width="12" title="Primary color" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
|
||||||
|
<secondarycolor type="colorpicker" category="Fonts" width="12" title="Secondary color" options="on|off" optionlabels="Yes|No">#888888</secondarycolor>
|
||||||
|
<!-- 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
|
||||||
|
first option "Same as base font" (value "base" = no extra class, the
|
||||||
|
element inherits the body font). Applied as class font-<value> on the
|
||||||
|
element in the views (nav_bar, progress_bar, question_text_container,
|
||||||
|
answers, help, group_name, group_desc, navigator). Default "base".
|
||||||
|
- <el>textcolor (dropdown): text color mode for that element —
|
||||||
|
default|primary|secondary|other (default "default" = the body font
|
||||||
|
color fontcolor). Resolved to an inline style="color: …" in the views.
|
||||||
|
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
|
||||||
|
= "other" (parent show-value "other"). -->
|
||||||
|
<headerfont type="fontselect" category="Fonts" width="4" title="Font for the header / top menu">base</headerfont>
|
||||||
|
<headertextcolor type="dropdown" category="Fonts" width="12" title="Text color for the header / top menu" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions>
|
||||||
|
<option value="default">Default font color</option>
|
||||||
|
<option value="primary">Primary color</option>
|
||||||
|
<option value="secondary">Secondary color</option>
|
||||||
|
<option value="other">Other…</option>
|
||||||
|
</dropdownoptions></headertextcolor>
|
||||||
|
<headertextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for the header / top menu" parent="headertextcolor">#444444</headertextcolorcustom>
|
||||||
|
<progressbarfont type="fontselect" category="Fonts" width="4" title="Font for the progress bar">base</progressbarfont>
|
||||||
|
<progressbartextcolor type="dropdown" category="Fonts" width="12" title="Text color for the progress bar" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions>
|
||||||
|
<option value="default">Default font color</option>
|
||||||
|
<option value="primary">Primary color</option>
|
||||||
|
<option value="secondary">Secondary color</option>
|
||||||
|
<option value="other">Other…</option>
|
||||||
|
</dropdownoptions></progressbartextcolor>
|
||||||
|
<progressbartextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for the progress bar" parent="progressbartextcolor">#444444</progressbartextcolorcustom>
|
||||||
|
<questiontitlefont type="fontselect" category="Fonts" width="4" title="Font for question titles">base</questiontitlefont>
|
||||||
|
<questiontitletextcolor type="dropdown" category="Fonts" 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">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="Fonts" width="12" title="Custom text color for question titles" parent="questiontitletextcolor">#444444</questiontitletextcolorcustom>
|
||||||
|
<answersfont type="fontselect" category="Fonts" width="4" title="Font for answers and help texts">base</answersfont>
|
||||||
|
<answerstextcolor type="dropdown" category="Fonts" 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">Default font color</option>
|
||||||
|
<option value="primary">Primary color</option>
|
||||||
|
<option value="secondary">Secondary color</option>
|
||||||
|
<option value="other">Other…</option>
|
||||||
|
</dropdownoptions></answerstextcolor>
|
||||||
|
<answerstextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for answers and help texts" parent="answerstextcolor">#444444</answerstextcolorcustom>
|
||||||
|
<grouptitlefont type="fontselect" category="Fonts" width="4" title="Font for group titles">base</grouptitlefont>
|
||||||
|
<grouptitletextcolor type="dropdown" category="Fonts" width="12" title="Text color for group titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions>
|
||||||
|
<option value="default">Default font color</option>
|
||||||
|
<option value="primary">Primary color</option>
|
||||||
|
<option value="secondary">Secondary color</option>
|
||||||
|
<option value="other">Other…</option>
|
||||||
|
</dropdownoptions></grouptitletextcolor>
|
||||||
|
<grouptitletextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for group titles" parent="grouptitletextcolor">#444444</grouptitletextcolorcustom>
|
||||||
|
<groupdescriptionfont type="fontselect" category="Fonts" width="4" title="Font for group descriptions">base</groupdescriptionfont>
|
||||||
|
<groupdescriptiontextcolor type="dropdown" category="Fonts" width="12" title="Text color for group descriptions" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions>
|
||||||
|
<option value="default">Default font color</option>
|
||||||
|
<option value="primary">Primary color</option>
|
||||||
|
<option value="secondary">Secondary color</option>
|
||||||
|
<option value="other">Other…</option>
|
||||||
|
</dropdownoptions></groupdescriptiontextcolor>
|
||||||
|
<groupdescriptiontextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for group descriptions" parent="groupdescriptiontextcolor">#444444</groupdescriptiontextcolorcustom>
|
||||||
|
<buttonsfont type="fontselect" category="Fonts" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
|
||||||
|
<buttonstextcolor type="dropdown" category="Fonts" 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">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="Fonts" width="12" title="Custom text color for the buttons (Previous/Next/Submit)" parent="buttonstextcolor">#444444</buttonstextcolorcustom>
|
||||||
<questiontitlefontsize type="buttons" category="Fonts" 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>
|
<questiontitlefontsize type="buttons" category="Fonts" 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="Fonts" width="6" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
<questiontitlefontweight type="buttons" category="Fonts" width="6" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
||||||
<grouptitlefontsize type="buttons" category="Fonts" 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>
|
<grouptitlefontsize type="buttons" category="Fonts" 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>
|
||||||
|
|
|
||||||
|
|
@ -311,15 +311,23 @@ var ThemeOptions = function () {
|
||||||
let enabled = true;
|
let enabled = true;
|
||||||
|
|
||||||
if(parentEl.length) {
|
if(parentEl.length) {
|
||||||
|
const wrapper = $(childEl).closest('.option-visibility');
|
||||||
|
const showValues = String(wrapper.data('show-if-value') || 'on').split('|');
|
||||||
|
// THEME ADDITION (Prompt U): the parent may also be a <select> (e.g.
|
||||||
|
// <el>textcolorcustom has parent <el>textcolor, a dropdown) — read the
|
||||||
|
// select's current value instead of a checked radio.
|
||||||
|
const parentSelect = parentEl.filter('select');
|
||||||
|
if (parentSelect.length) {
|
||||||
|
enabled = showValues.indexOf(String(parentSelect.val())) !== -1;
|
||||||
|
} else {
|
||||||
// THEME ADDITION (Prompt R): parentEl is a SET of radios — read the
|
// THEME ADDITION (Prompt R): parentEl is a SET of radios — read the
|
||||||
// CHECKED one (not the first element) and accept any of the wrapper's
|
// CHECKED one (not the first element) and accept any of the wrapper's
|
||||||
// show-values (data-show-if-value, pipe-separated). Single-value
|
// show-values (data-show-if-value, pipe-separated). Single-value
|
||||||
// parents ('on') behave exactly as before.
|
// parents ('on') behave exactly as before.
|
||||||
const checked = parentEl.filter(':checked');
|
const checked = parentEl.filter(':checked');
|
||||||
const wrapper = $(childEl).closest('.option-visibility');
|
|
||||||
const showValues = String(wrapper.data('show-if-value') || 'on').split('|');
|
|
||||||
enabled = checked.length > 0 && showValues.indexOf(String(checked.val())) !== -1;
|
enabled = checked.length > 0 && showValues.indexOf(String(checked.val())) !== -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(childEl).prop('disabled', !enabled);
|
$(childEl).prop('disabled', !enabled);
|
||||||
};
|
};
|
||||||
|
|
@ -327,7 +335,8 @@ var ThemeOptions = function () {
|
||||||
// grab the parent for a given child field
|
// grab the parent for a given child field
|
||||||
const getParent = function(childEl) {
|
const getParent = function(childEl) {
|
||||||
const parentName = $(childEl).data('parent');
|
const parentName = $(childEl).data('parent');
|
||||||
const parentEl = $(`input[name=${parentName}]`);
|
// THEME ADDITION (Prompt U): match selects too, not only radio inputs
|
||||||
|
const parentEl = $(`input[name=${parentName}], select[name=${parentName}]`);
|
||||||
return parentEl;
|
return parentEl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -353,12 +362,20 @@ var ThemeOptions = function () {
|
||||||
// value keeps working unchanged.
|
// value keeps working unchanged.
|
||||||
const showValues = String($(wrapperEl).data('show-if-value') || 'on').split('|');
|
const showValues = String($(wrapperEl).data('show-if-value') || 'on').split('|');
|
||||||
const parentInputs = $('input[name="' + parentName + '"]');
|
const parentInputs = $('input[name="' + parentName + '"]');
|
||||||
// no parent input in the markup (e.g. font's self-parent): always visible,
|
const parentSelects = $('select[name="' + parentName + '"]');
|
||||||
|
// no parent input in the markup: always visible,
|
||||||
// same fallback as updateChild() above
|
// same fallback as updateChild() above
|
||||||
if (parentInputs.length === 0) {
|
if (parentInputs.length === 0 && parentSelects.length === 0) {
|
||||||
$(wrapperEl).removeClass('d-none');
|
$(wrapperEl).removeClass('d-none');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// THEME ADDITION (Prompt U): select parent (e.g. <el>textcolor dropdown) —
|
||||||
|
// visibility follows the select's current value, multi-value aware
|
||||||
|
if (parentInputs.length === 0 && parentSelects.length > 0) {
|
||||||
|
const visible = showValues.indexOf(String(parentSelects.val())) !== -1;
|
||||||
|
$(wrapperEl).toggleClass('d-none', !visible);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const checked = parentInputs.filter(':checked');
|
const checked = parentInputs.filter(':checked');
|
||||||
const visible = checked.length > 0 && showValues.indexOf(String(checked.val())) !== -1;
|
const visible = checked.length > 0 && showValues.indexOf(String(checked.val())) !== -1;
|
||||||
$(wrapperEl).toggleClass('d-none', !visible);
|
$(wrapperEl).toggleClass('d-none', !visible);
|
||||||
|
|
@ -621,6 +638,15 @@ var ThemeOptions = function () {
|
||||||
|
|
||||||
// THEME ADDITION: re-evaluate conditional visibility whenever a radio changes
|
// THEME ADDITION: re-evaluate conditional visibility whenever a radio changes
|
||||||
globalForm.find('.selector_option_radio_field').on('change', updateVisibilityByParent);
|
globalForm.find('.selector_option_radio_field').on('change', updateVisibilityByParent);
|
||||||
|
|
||||||
|
// THEME ADDITION (Prompt U): a changed SELECT may also be a parent of
|
||||||
|
// conditional fields (e.g. <el>textcolor driving <el>textcolorcustom) —
|
||||||
|
// bound separately so visibility updates even if updateFieldSettings()
|
||||||
|
// above throws on the same event
|
||||||
|
globalForm.find('select').on('change', function () {
|
||||||
|
updateVisibilityByParent();
|
||||||
|
updateAllChildren();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// THEME ADDITION: order the font dropdowns' optgroups as:
|
// THEME ADDITION: order the font dropdowns' optgroups as:
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,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 = '20261125.1' %}
|
{% set OPTIONS_JS_TOKEN = '20261125.2' %}
|
||||||
{{ 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') }}
|
||||||
|
|
||||||
|
|
@ -163,12 +163,31 @@
|
||||||
next to it stays empty) directly below the logo hr, in this fixed order. #}
|
next to it stays empty) directly below the logo hr, in this fixed order. #}
|
||||||
{% set aProgressKeys = ['progressbarposition', 'progressbarbackgroundcolor', 'progressbarcolor', 'progressbarfontcolor'] %}
|
{% set aProgressKeys = ['progressbarposition', 'progressbarbackgroundcolor', 'progressbarcolor', 'progressbarfontcolor'] %}
|
||||||
|
|
||||||
|
{# Prompt U: the elements that get a font+color combo row in the "Fonts and
|
||||||
|
colors" pane. Per element <el> the keys are <el>font (fontselect),
|
||||||
|
<el>textcolor (dropdown default|primary|secondary|other) and
|
||||||
|
<el>textcolorcustom (colorpicker, visible only when <el>textcolor = "other"). #}
|
||||||
|
{% set aFontElements = ['header', 'progressbar', 'questiontitle', 'answers', 'grouptitle', 'groupdescription', 'buttons'] %}
|
||||||
|
|
||||||
{# Prompt R: multi-value show lists per parent key, rendered as
|
{# Prompt R: multi-value show lists per parent key, rendered as
|
||||||
data-show-if-value (e.g. "box|top" for questionborder). Core passes only the
|
data-show-if-value (e.g. "box|top" for questionborder). Core passes only the
|
||||||
`parent` attribute through to the option attributes, so this list lives here
|
`parent` attribute through to the option attributes, so this list lives here
|
||||||
in the theme. Default 'on'. Used both for the wrapper attribute and for the
|
in the theme. Default 'on'. Used both for the wrapper attribute and for the
|
||||||
server-side initial d-none (Prompt Q). #}
|
server-side initial d-none (Prompt Q). Prompt U adds 'other' for every
|
||||||
|
<el>textcolor dropdown (parent of <el>textcolorcustom). #}
|
||||||
{% set aShowIfValues = { 'questionborder': 'box|top' } %}
|
{% set aShowIfValues = { 'questionborder': 'box|top' } %}
|
||||||
|
{% for el in aFontElements %}{% set aShowIfValues = aShowIfValues|merge({ (el ~ 'textcolor'): 'other' }) %}{% endfor %}
|
||||||
|
|
||||||
|
{# Prompt U: the Fonts pane is rendered as "Fonts and colors" with a special
|
||||||
|
layout: a TOP ROW (col 1: font/fontcolor/fontsize; col 2: primarycolor/
|
||||||
|
secondarycolor; col 3 empty), an hr, then one combo row per element in
|
||||||
|
aFontElements (col 1: <el>font, col 2: <el>textcolor, col 3:
|
||||||
|
<el>textcolorcustom), then the remaining Fonts options (sizes/weights)
|
||||||
|
stacked as usual ("rest"). config.xml lists the Fonts options in exactly
|
||||||
|
this order, so the generic loop meets them slot by slot and opens/closes
|
||||||
|
the containers on slot change (fLastSlot). #}
|
||||||
|
{% set aFontsTop1 = ['font', 'fontcolor', 'fontsize'] %}
|
||||||
|
{% set aFontsTop2 = ['primarycolor', 'secondarycolor'] %}
|
||||||
|
|
||||||
{# Prompt R: the Questions pane renders as THREE columns (col-md-4, border-start
|
{# Prompt R: the Questions pane renders as THREE columns (col-md-4, border-start
|
||||||
between them) with explicit key lists. config.xml lists the Questions options
|
between them) with explicit key lists. config.xml lists the Questions options
|
||||||
|
|
@ -187,7 +206,7 @@
|
||||||
stay stable regardless of the tab order. #}
|
stay stable regardless of the tab order. #}
|
||||||
{% set aTabs = [] %}
|
{% set aTabs = [] %}
|
||||||
{% if 'Fonts' in aOptionAttributes.categories %}
|
{% if 'Fonts' in aOptionAttributes.categories %}
|
||||||
{% set aTabs = [{ 'id': 'category-fonts', 'label': 'Fonts', 'category': 'Fonts', 'keys': null }] %}
|
{% set aTabs = [{ 'id': 'category-fonts', 'label': 'Fonts and colors', 'category': 'Fonts', 'keys': null }] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set aTabs = aTabs|merge([{ 'id': 'top-of-page', 'label': 'Top of the page', 'category': 'Top of the page', 'keys': aTopOfPageKeys }]) %}
|
{% set aTabs = aTabs|merge([{ 'id': 'top-of-page', 'label': 'Top of the page', 'category': 'Top of the page', 'keys': aTopOfPageKeys }]) %}
|
||||||
{% for category in aOptionAttributes.categories %}
|
{% for category in aOptionAttributes.categories %}
|
||||||
|
|
@ -249,6 +268,7 @@
|
||||||
below stays full width. #}
|
below stays full width. #}
|
||||||
{% if tab.category == 'Images' %}<div class="col-md-4 images-options-column">{% endif %}
|
{% if tab.category == 'Images' %}<div class="col-md-4 images-options-column">{% endif %}
|
||||||
{% set qLastCol = 0 %}
|
{% set qLastCol = 0 %}
|
||||||
|
{% set fLastSlot = 0 %}
|
||||||
{% for key in aTabKeys %}
|
{% for key in aTabKeys %}
|
||||||
{% set attr = aOptionAttributes.optionAttributes[key] ?? null %}
|
{% set attr = aOptionAttributes.optionAttributes[key] ?? null %}
|
||||||
{% if attr is not null %}
|
{% if attr is not null %}
|
||||||
|
|
@ -339,7 +359,36 @@
|
||||||
{% set qLastCol = qCol %}
|
{% set qLastCol = qCol %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bQuestionsPane %}{% set wrapClass = 'col-12' %}{% elseif bProgressKey %}{% set wrapClass = 'col-12' %}{% else %}{% set wrapClass = 'col-12 col-md-' ~ attr.width|default(2) %}{% endif %}
|
{# Prompt U: Fonts pane ("Fonts and colors") — slot-based layout. Slots:
|
||||||
|
top1 (top row col 1), top2 (top row col 2), combo1/2/3 (per-element
|
||||||
|
combo row cols 1-3), rest (sizes/weights, normal grid). On slot
|
||||||
|
change close the previous container(s) and open the new one. All
|
||||||
|
slots except rest have exactly two open divs (row + col). #}
|
||||||
|
{% set bFontsPane = tab.category == 'Fonts' %}
|
||||||
|
{% set fSlot = 'rest' %}
|
||||||
|
{% if bFontsPane %}
|
||||||
|
{% if key in aFontsTop1 %}{% set fSlot = 'top1' %}
|
||||||
|
{% elseif key in aFontsTop2 %}{% set fSlot = 'top2' %}
|
||||||
|
{% else %}
|
||||||
|
{% for el in aFontElements %}
|
||||||
|
{% if key == el ~ 'font' %}{% set fSlot = 'combo1' %}
|
||||||
|
{% elseif key == el ~ 'textcolor' %}{% set fSlot = 'combo2' %}
|
||||||
|
{% elseif key == el ~ 'textcolorcustom' %}{% set fSlot = 'combo3' %}{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if fSlot != fLastSlot %}
|
||||||
|
{% if fLastSlot == 'top2' %}</div><div class="col-md-4"></div></div><div class="row action_hide_on_inherit"><div class="col-12"><hr class="fonts-hr"></div></div>{% endif %}
|
||||||
|
{% if fLastSlot == 'combo3' %}</div></div>{% endif %}
|
||||||
|
{% if fSlot == 'top1' %}<div class="row fonts-top-row"><div class="col-md-4">
|
||||||
|
{% elseif fSlot == 'top2' %}</div><div class="col-md-4">
|
||||||
|
{% elseif fSlot == 'combo1' %}<div class="row font-combo-row"><div class="col-md-4">
|
||||||
|
{% elseif fSlot == 'combo2' %}</div><div class="col-md-4">
|
||||||
|
{% elseif fSlot == 'combo3' %}</div><div class="col-md-4">
|
||||||
|
{% endif %}
|
||||||
|
{% set fLastSlot = fSlot %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% if bQuestionsPane or bProgressKey or (bFontsPane and fSlot != 'rest') %}{% set wrapClass = 'col-12' %}{% else %}{% set wrapClass = 'col-12 col-md-' ~ attr.width|default(2) %}{% endif %}
|
||||||
{# server-side current value for this option (checked/selected/value) #}
|
{# server-side current value for this option (checked/selected/value) #}
|
||||||
{% set currentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[key] is defined ? aCurrentOptions[key] : (oParentOptions[key] is defined ? oParentOptions[key] : '')) %}
|
{% set currentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[key] is defined ? aCurrentOptions[key] : (oParentOptions[key] is defined ? oParentOptions[key] : '')) %}
|
||||||
{# parent != '': this field is only visible when the parent option's value
|
{# parent != '': this field is only visible when the parent option's value
|
||||||
|
|
@ -347,20 +396,20 @@
|
||||||
questionborder, see aShowIfValues). options.js toggles
|
questionborder, see aShowIfValues). options.js toggles
|
||||||
.option-visibility via data-show-if-parent/data-show-if-value;
|
.option-visibility via data-show-if-parent/data-show-if-value;
|
||||||
the field itself is additionally disabled via data-parent/selector_radio_childfield #}
|
the field itself is additionally disabled via data-parent/selector_radio_childfield #}
|
||||||
{# Prompt Q (multi-value since Prompt R): server-side INITIAL visibility —
|
{# Prompt Q (multi-value since Prompt R, dropdown parents since Prompt U):
|
||||||
when the parent is a buttons group, add d-none at render time unless the
|
server-side INITIAL visibility — when the parent is a buttons group
|
||||||
parent's current value is IN the show-value list. Same source of truth
|
or a dropdown (e.g. <el>textcolorcustom with parent <el>textcolor,
|
||||||
as currentValue (stored options JSON, fallback oParentOptions). options.js
|
show-value "other"), add d-none at render time unless the parent's
|
||||||
|
current value is IN the show-value list. Same source of truth as
|
||||||
|
currentValue (stored options JSON, fallback oParentOptions). options.js
|
||||||
updateVisibilityByParent() toggles the same class on change (idempotent
|
updateVisibilityByParent() toggles the same class on change (idempotent
|
||||||
with this initial state). Non-buttons parents (e.g. font's self-parent
|
with this initial state). #}
|
||||||
dropdown) have no radio inputs -> options.js always shows them, so no
|
|
||||||
d-none here. #}
|
|
||||||
{% set bParentHidden = false %}
|
{% set bParentHidden = false %}
|
||||||
{% set showIfValues = 'on' %}
|
{% set showIfValues = 'on' %}
|
||||||
{% if attr.parent != '' %}
|
{% if attr.parent != '' and attr.parent != key %}
|
||||||
{% set parentAttr = aOptionAttributes.optionAttributes[attr.parent] ?? null %}
|
{% set parentAttr = aOptionAttributes.optionAttributes[attr.parent] ?? null %}
|
||||||
{% set showIfValues = aShowIfValues[attr.parent] ?? 'on' %}
|
{% set showIfValues = aShowIfValues[attr.parent] ?? 'on' %}
|
||||||
{% if parentAttr is not null and parentAttr.type == 'buttons' %}
|
{% if parentAttr is not null and (parentAttr.type == 'buttons' or parentAttr.type == 'dropdown') %}
|
||||||
{% set parentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[attr.parent] is defined ? aCurrentOptions[attr.parent] : (oParentOptions[attr.parent] is defined ? oParentOptions[attr.parent] : '')) %}
|
{% set parentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[attr.parent] is defined ? aCurrentOptions[attr.parent] : (oParentOptions[attr.parent] is defined ? oParentOptions[attr.parent] : '')) %}
|
||||||
{% if parentValue not in showIfValues|split('|') %}{% set bParentHidden = true %}{% endif %}
|
{% if parentValue not in showIfValues|split('|') %}{% set bParentHidden = true %}{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
@ -505,6 +554,9 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if tab.category == 'Images' %}</div>{% endif %}
|
{% if tab.category == 'Images' %}</div>{% endif %}
|
||||||
{% if tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
|
{% if tab.category == 'Questions' and qLastCol > 0 %}</div>{% endif %}
|
||||||
|
{# Prompt U: close the Fonts pane's open slot container (every non-rest
|
||||||
|
slot has exactly two open divs: row + col) #}
|
||||||
|
{% if tab.category == 'Fonts' and fLastSlot != 0 and fLastSlot != 'rest' %}</div></div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if tab.category == 'Images' %}
|
{% if tab.category == 'Images' %}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<version>3.3.0</version>
|
<version>3.3.0</version>
|
||||||
<apiVersion>3</apiVersion>
|
<apiVersion>3</apiVersion>
|
||||||
<description>Example variant of vanilla_respondage, generated by variants/build.php — demonstrates the output of the build process. Not a real client.</description>
|
<description>Example variant of vanilla_respondage, generated by variants/build.php — demonstrates the output of the build process. Not a real client.</description>
|
||||||
<lastUpdate>2026-11-24 21:52:01</lastUpdate>
|
<lastUpdate>2026-11-25 10:51:33</lastUpdate>
|
||||||
<extends>vanilla_respondage</extends>
|
<extends>vanilla_respondage</extends>
|
||||||
</metadata>
|
</metadata>
|
||||||
<compatibility>
|
<compatibility>
|
||||||
|
|
@ -84,74 +84,118 @@
|
||||||
the json; build.php checks that the key exists.
|
the json; build.php checks that the key exists.
|
||||||
-->
|
-->
|
||||||
<options>
|
<options>
|
||||||
<hideprivacyinfo type="buttons" category="Simple options" width="4" title="Hide privacy info" options="on|off" optionlabels="Yes|No">off</hideprivacyinfo>
|
<!-- Prompt O: the five "Simple options" are width=12, so they stack in ONE
|
||||||
<container type="buttons" category="Simple options" width="4" title="Survey container" options="on|off" optionlabels="Yes|No">on</container>
|
column (full-width rows) in the Simple options tab, label above each
|
||||||
<showpopups type="buttons" category="Simple options" width="4" title="Show popups" options="1|0|-1" optionlabels="Popup|On page|No">1</showpopups>
|
control (Prompt G). -->
|
||||||
<showclearall type="buttons" category="Simple options" width="4" title="Show Clear All button" options="on|off" optionlabels="Yes|No">off</showclearall>
|
<hideprivacyinfo type="buttons" category="Simple options" width="12" title="Hide privacy info" options="on|off" optionlabels="Yes|No">off</hideprivacyinfo>
|
||||||
<fixnumauto type="buttons" category="Simple options" width="4" title="Fix automatically numeric value" options="enable|partial|disable" optionlabels="Yes|For expression|No">enable</fixnumauto>
|
<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>
|
||||||
<!-- Images
|
<!-- Images
|
||||||
HOUSE-STYLE: logos (on/off + file + hide-on-small-screen), logotopmargin,
|
HOUSE-STYLE: logos, background image and bodybackgroundcolor are set per
|
||||||
background image and bodybackgroundcolor are set per variant via
|
variant via variants/<client>.json -->
|
||||||
variants/<client>.json -->
|
|
||||||
<!-- Images -->
|
<!-- Images -->
|
||||||
<brandlogo type="buttons" category="Images" width="2" title="Display logo on the left of the header" options="on|off" optionlabels="Yes|No">on</brandlogo>
|
<!-- Logos (Prompt M): per logo (left=brand, center, right) a file dropdown whose
|
||||||
<brandlogofile type="imagefile" category="Images" width="7" title="Logo file (left)" parent="brandlogo">./files/logo.png</brandlogofile>
|
FIRST option is "No logo" (value "off", prepended by options.twig), a top
|
||||||
<brandlogohideonsmall type="buttons" category="Images" width="3" title="Hide the left logo on small screens (phones)" options="on|off" optionlabels="Yes|No" parent="brandlogo">on</brandlogohideonsmall>
|
margin in px (plain number 0-100; the views add the "px"), and "Show logo
|
||||||
<centerlogo type="buttons" category="Images" width="2" title="Display logo in the center of the header" options="on|off" optionlabels="Yes|No">off</centerlogo>
|
on" checkboxes per device (Bootstrap breakpoints: mobile < 768px,
|
||||||
<centerlogofile type="imagefile" category="Images" width="7" title="Logo file (center)" parent="centerlogo">./files/logo.png</centerlogofile>
|
tablet 768-991px, computer >= 992px). Defaults: left logo on with
|
||||||
<centerlogohideonsmall type="buttons" category="Images" width="3" title="Hide the center logo on small screens (phones)" options="on|off" optionlabels="Yes|No" parent="centerlogo">on</centerlogohideonsmall>
|
logo.png, center/right "off" (no logo); margin 15; show on computer and
|
||||||
<rightlogo type="buttons" category="Images" width="2" title="Display logo on the right of the header" options="on|off" optionlabels="Yes|No">off</rightlogo>
|
tablet, NOT on mobile (same as the old hide-on-small default).
|
||||||
<rightlogofile type="imagefile" category="Images" width="7" title="Logo file (right)" parent="rightlogo">./files/logo2.png</rightlogofile>
|
The old keys (brandlogo/centerlogo/rightlogo, *logohideonsmall, the shared
|
||||||
<rightlogohideonsmall type="buttons" category="Images" width="3" title="Hide the right logo on small screens (phones)" options="on|off" optionlabels="Yes|No" parent="rightlogo">on</rightlogohideonsmall>
|
logotopmargin) were removed; variants/build.php maps the variant json's
|
||||||
<logotopmargin type="duration" category="Images" width="3" title="Distance from the logo to the top of the screen (use 0px to align a logo exactly with the very top)">15px</logotopmargin>
|
old keys onto these new keys. -->
|
||||||
<backgroundimage type="buttons" category="Images" width="4" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
|
<brandlogofile type="imagefile" category="Images" width="12" title="Logo file (left)">./files/logo.png</brandlogofile>
|
||||||
<backgroundimagefixed type="buttons" category="Images" width="4" title="Background image fixed or scroll" options="fixed|scroll" optionlabels="Fixed|Scroll">scroll</backgroundimagefixed>
|
<brandlogotopmargin type="text" category="Images" width="12" title="Margin between logo and top of screen (left), in px (0-100)">15</brandlogotopmargin>
|
||||||
<backgroundimagedisplay type="buttons" category="Images" width="4" title="Background image display" options="tile|cover" optionlabels="Tile|Cover">tile</backgroundimagedisplay>
|
<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)">off</centerlogofile>
|
||||||
|
<centerlogotopmargin type="text" category="Images" width="12" title="Margin between logo and top of screen (center), in px (0-100)">15</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)">off</rightlogofile>
|
||||||
|
<rightlogotopmargin type="text" category="Images" width="12" title="Margin between logo and top of screen (right), in px (0-100)">15</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>
|
||||||
|
<!-- 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",
|
||||||
|
shown/hidden via .option-visibility in options.twig/options.js).
|
||||||
|
Prompt P: all five width=12 — the Images pane renders them stacked in
|
||||||
|
column 1 of a three-column grid (only that column is used). -->
|
||||||
|
<backgroundimage type="buttons" category="Images" width="12" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
|
||||||
|
<bodybackgroundcolor type="colorpicker" category="Images" width="12" title="Overall background color (when there is no picture in the background)" options="on|off" optionlabels="Yes|No">#dddddd</bodybackgroundcolor>
|
||||||
|
<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>
|
<backgroundimagefile type="imagefile" category="Images" width="12" title="Background image file" parent="backgroundimage">./files/tiledtexture.png</backgroundimagefile>
|
||||||
<bodybackgroundcolor type="colorpicker" category="Images" width="8" title="Overall background color (when there is no picture in the background)" options="on|off" optionlabels="Yes|No">#f5f3f7</bodybackgroundcolor>
|
|
||||||
<!-- Questions
|
<!-- Questions
|
||||||
HOUSE-STYLE: the colorpicker options in this section (question
|
HOUSE-STYLE: the colorpicker options in this section (question
|
||||||
title/background/help/border/checkbox colors) are house-style colors.
|
title/background/help/help-font/border/checkbox colors) are house-style
|
||||||
NOT house-style (structural, same for all variants): questionborder,
|
colors. NOT house-style (structural, same for all variants):
|
||||||
questionborderstyle, the borderradius values, questiondropdown and
|
questionborder, questionborderstyle, the borderradius values,
|
||||||
questionhelptextposition. -->
|
questiondropdown and questionhelptextposition.
|
||||||
|
Prompt R: order = the three columns of the Questions tab (options.twig
|
||||||
|
renders them in this order): col1 colors+help, col2 border + its
|
||||||
|
conditional children, col3 checkbox color. All width=12 — inside the
|
||||||
|
pane each option stacks as col-12 in its column. The border children
|
||||||
|
carry parent="questionborder"; the show-values "box|top" cannot be an
|
||||||
|
XML attribute (core passes only `parent` through), so the multi-value
|
||||||
|
list lives in options.twig (aShowIfValues) and lands as
|
||||||
|
data-show-if-value="box|top". questionhelpfontcolor (NEW) is applied
|
||||||
|
in custom_header.twig on .question-help-container. -->
|
||||||
<!-- Questions -->
|
<!-- Questions -->
|
||||||
<questiontitlebackgroundcolor type="colorpicker" category="Questions" width="6" title="Question title background color" options="on|off" optionlabels="Yes|No">#5e1c64</questiontitlebackgroundcolor>
|
<questiontitlebackgroundcolor type="colorpicker" category="Questions" width="12" title="Question title background color" options="on|off" optionlabels="Yes|No">#5e1c64</questiontitlebackgroundcolor>
|
||||||
<questiontitlefontcolor type="colorpicker" category="Questions" width="6" title="Question title font color" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
<questiontitlefontcolor type="colorpicker" category="Questions" width="12" title="Question title font color" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
||||||
<questionbackgroundcolor type="colorpicker" category="Questions" width="6" title="Question background color (not title)" options="on|off" optionlabels="Yes|No">#ffffff</questionbackgroundcolor>
|
<questionbackgroundcolor type="colorpicker" category="Questions" width="12" title="Question background color (not title)" options="on|off" optionlabels="Yes|No">#ffffff</questionbackgroundcolor>
|
||||||
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="6" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="12" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
||||||
<questionborder type="buttons" category="Questions" width="6" title="Question border" options="box|top|none" optionlabels="Box around|Top and bottom|None">box</questionborder>
|
<questionhelpfontcolor type="colorpicker" category="Questions" width="12" title="Question help font color" options="on|off" optionlabels="Yes|No">#444444</questionhelpfontcolor>
|
||||||
<questionborderstyle type="buttons" category="Questions" width="6" title="Question border line style" options="solid|dotted|dashed" optionlabels="Solid|Dotted|Dashed">solid</questionborderstyle>
|
<questionhelptextposition type="buttons" category="Questions" width="12" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
||||||
<questionbordercolor type="colorpicker" category="Questions" width="12" title="Question border color" options="on|off" optionlabels="Yes|No">#cccccc</questionbordercolor>
|
<questionborder type="buttons" category="Questions" width="12" title="Question border" options="box|top|none" optionlabels="Box around|Top and bottom|None">box</questionborder>
|
||||||
<questionborderradiusTL type="duration" category="Questions" width="3" title="Border radius top left">5px</questionborderradiusTL>
|
<questionbordercolor type="colorpicker" category="Questions" width="12" title="Question border color" options="on|off" optionlabels="Yes|No" parent="questionborder">#cccccc</questionbordercolor>
|
||||||
<questionborderradiusTR type="duration" category="Questions" width="3" title="Border radius top right">5px</questionborderradiusTR>
|
<questionborderstyle type="buttons" category="Questions" width="12" title="Question border line style" options="solid|dotted|dashed" optionlabels="Solid|Dotted|Dashed" parent="questionborder">solid</questionborderstyle>
|
||||||
<questionborderradiusBL type="duration" category="Questions" width="3" title="Border radius bottom left">5px</questionborderradiusBL>
|
<questiondropdown type="buttons" category="Questions" width="12" title="Question dropdown shadow" options="on|hover|off" optionlabels="Always|On hover only|None" parent="questionborder">hover</questiondropdown>
|
||||||
<questionborderradiusBR type="duration" category="Questions" width="3" title="Border radius bottom right">5px</questionborderradiusBR>
|
<questionborderradiusTL type="duration" category="Questions" width="12" title="Border radius top left" parent="questionborder">5px</questionborderradiusTL>
|
||||||
<questiondropdown type="buttons" category="Questions" width="6" title="Question dropdown shadow" options="on|hover|off" optionlabels="Always|On hover only|None">hover</questiondropdown>
|
<questionborderradiusTR type="duration" category="Questions" width="12" title="Border radius top right" parent="questionborder">5px</questionborderradiusTR>
|
||||||
<questionhelptextposition type="buttons" category="Questions" width="6" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
<questionborderradiusBL type="duration" category="Questions" width="12" title="Border radius bottom left" parent="questionborder">5px</questionborderradiusBL>
|
||||||
<checkboxcolor type="colorpicker" category="Questions" width="6" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
|
<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 -->
|
||||||
<progressbarposition type="buttons" category="Progress" width="6" title="Position of the progress bar" options="under|in" optionlabels="Under header|In header">under</progressbarposition>
|
<!-- 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>
|
||||||
<!-- Header sticky per screen size (shown in the "Top of the page" tab).
|
<!-- Header sticky per screen size (shown in the "Top of the page" 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). The three
|
tablet = md..lg (768-991px), computer >= lg (992px). nav_bar.twig no
|
||||||
checkboxes are children of the master switch: they are only visible
|
longer hardcodes fixed-top; custom_header.twig emits the media
|
||||||
(and enabled) when "Make header sticky" is on. nav_bar.twig no longer
|
queries. Defaults: sticky on computer + tablet, NOT on mobile. -->
|
||||||
hardcodes fixed-top; custom_header.twig emits the media queries.
|
<!-- Prompt L: the master key "headersticky" is kept in config.xml/DB for
|
||||||
Defaults: sticky on computer + tablet, NOT on mobile. -->
|
backward compatibility, but the options page renders it as a static
|
||||||
<headersticky type="buttons" category="Top of the page" width="4" title="Make header sticky" options="on|off" optionlabels="Yes|No">on</headersticky>
|
LABEL only (see options.twig). Sticky behaviour is governed solely by
|
||||||
<headerstickycomputer type="checkbox" category="Top of the page" width="4" title="Computer screen" parent="headersticky">on</headerstickycomputer>
|
the three checkboxes below, which no longer have a parent (always
|
||||||
<headerstickytablet type="checkbox" category="Top of the page" width="4" title="Tablet" parent="headersticky">on</headerstickytablet>
|
visible, stacked as a list via width=12). Migration note: an old row
|
||||||
<headerstickymobile type="checkbox" category="Top of the page" width="4" title="Mobile phone" parent="headersticky">off</headerstickymobile>
|
with headersticky=off no longer disables sticky — only the checkboxes
|
||||||
|
count (defaults on/on/off). -->
|
||||||
|
<headersticky type="buttons" category="Top of the page" width="12" title="Make header sticky" options="on|off" optionlabels="Yes|No">on</headersticky>
|
||||||
|
<headerstickycomputer type="checkbox" category="Top of the page" width="12" title="Computer screen">on</headerstickycomputer>
|
||||||
|
<headerstickytablet type="checkbox" category="Top of the page" width="12" title="Tablet">on</headerstickytablet>
|
||||||
|
<headerstickymobile type="checkbox" category="Top of the page" width="12" title="Mobile phone">off</headerstickymobile>
|
||||||
<!-- Various colors
|
<!-- Various colors
|
||||||
HOUSE-STYLE: ALL colorpickers in this section (header, navbar menu,
|
HOUSE-STYLE: ALL colorpickers in this section (header, navbar menu,
|
||||||
primary, font, slider, progressbar, privacy) are house-style colors
|
slider, progressbar, privacy) are house-style colors and are set per
|
||||||
and are set per variant via variants/<client>.json -->
|
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). -->
|
||||||
<!-- Various colors -->
|
<!-- Various colors -->
|
||||||
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor>
|
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor>
|
||||||
<navbarfontcolor type="colorpicker" category="Colors" width="12" title="Menu item text color in the top bar (should contrast with the header background color)" options="on|off" optionlabels="Yes|No">#444444</navbarfontcolor>
|
<navbarfontcolor type="colorpicker" category="Colors" width="12" title="Menu item text color in the top bar (should contrast with the header background color)" options="on|off" optionlabels="Yes|No">#444444</navbarfontcolor>
|
||||||
<primarycolor type="colorpicker" category="Colors" width="12" title="Primary color (for buttons)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
|
|
||||||
<fontcolor type="colorpicker" category="Colors" width="12" title="Base font color" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
|
|
||||||
<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>
|
||||||
<progressbarbackgroundcolor type="colorpicker" category="Colors" width="12" title="Progress bar background color" options="on|off" optionlabels="Yes|No">#eeeeee</progressbarbackgroundcolor>
|
<progressbarbackgroundcolor type="colorpicker" category="Colors" width="12" title="Progress bar background color" options="on|off" optionlabels="Yes|No">#eeeeee</progressbarbackgroundcolor>
|
||||||
<progressbarcolor type="colorpicker" category="Colors" width="12" title="Progress bar color" options="on|off" optionlabels="Yes|No">#5e1c64</progressbarcolor>
|
<progressbarcolor type="colorpicker" category="Colors" width="12" title="Progress bar color" options="on|off" optionlabels="Yes|No">#5e1c64</progressbarcolor>
|
||||||
|
|
@ -196,26 +240,61 @@
|
||||||
+ the "Bundled open source fonts" optgroup below). -->
|
+ the "Bundled open source fonts" optgroup below). -->
|
||||||
<!-- fonts -->
|
<!-- fonts -->
|
||||||
<!-- When adding new items, please keep fonts ordered alphabetically -->
|
<!-- When adding new items, please keep fonts ordered alphabetically -->
|
||||||
<font type="dropdown" category="Fonts" width="4" title="Default font (body text)" parent="font">noto_sans
|
<font type="dropdown" category="Fonts" 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"><option class="font-eb_garamond " value="eb_garamond" data-font-package="websafe">EB Garamond (serif)</option><option class="font-inter " value="inter" data-font-package="websafe">Inter (sans-serif)</option><option class="font-liberation_sans " value="liberation_sans" data-font-package="websafe">Liberation Sans (sans-serif)</option><option class="font-noto_sans " value="noto_sans" data-font-package="websafe">Noto Sans (sans-serif)</option><option class="font-noto_serif " value="noto_serif" data-font-package="websafe">Noto Serif (serif)</option><option class="font-open_sans " value="open_sans" data-font-package="websafe">Open Sans (sans-serif)</option><option class="font-source_serif_4 " value="source_serif_4" data-font-package="websafe">Source Serif 4 (serif)</option></optgroup><!-- Custom fonts of a variant are appended to the optgroup below by variants/build.php ("fontOptions" in the variant json) --><optgroup label="Custom (this theme)">
|
<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"><option class="font-eb_garamond " value="eb_garamond" data-font-package="websafe">EB Garamond (serif)</option><option class="font-inter " value="inter" data-font-package="websafe">Inter (sans-serif)</option><option class="font-liberation_sans " value="liberation_sans" data-font-package="websafe">Liberation Sans (sans-serif)</option><option class="font-noto_sans " value="noto_sans" data-font-package="websafe">Noto Sans (sans-serif)</option><option class="font-noto_serif " value="noto_serif" data-font-package="websafe">Noto Serif (serif)</option><option class="font-open_sans " value="open_sans" data-font-package="websafe">Open Sans (sans-serif)</option><option class="font-source_serif_4 " value="source_serif_4" data-font-package="websafe">Source Serif 4 (serif)</option></optgroup><!-- Custom fonts of a variant are appended to the optgroup below by variants/build.php ("fontOptions" in the variant json) --><optgroup label="Custom (this theme)">
|
||||||
</optgroup><optgroup label="User browser"><option class="font-arial " value="arial" data-font-package="websafe">Arial</option><option class="font-arial_black " value="arial_black" data-font-package="websafe">Arial Black</option><option class="font-comic_sans " value="comic_sans" data-font-package="websafe">Comic Sans</option><option class="font-courier " value="courier" data-font-package="websafe">Courier New</option><option class="font-georgia " value="georgia" data-font-package="websafe">Georgia</option><option class="font-impact " value="impact" data-font-package="websafe">Impact</option><option class="font-lucida_console " value="lucida_console" data-font-package="websafe">Lucida Console</option><option class="font-lucida_sans " value="lucida_sans" data-font-package="websafe">Lucida Sans</option><option class="font-palatino " value="palatino" data-font-package="websafe">Palatino Linotype</option><option class="font-times_new_roman " value="times_new_roman" data-font-package="websafe">Times New Roman</option><option class="font-trebuchet " value="trebuchet" data-font-package="websafe">Trebuchet</option></optgroup></dropdownoptions>
|
</optgroup><optgroup label="User browser"><option class="font-arial " value="arial" data-font-package="websafe">Arial</option><option class="font-arial_black " value="arial_black" data-font-package="websafe">Arial Black</option><option class="font-comic_sans " value="comic_sans" data-font-package="websafe">Comic Sans</option><option class="font-courier " value="courier" data-font-package="websafe">Courier New</option><option class="font-georgia " value="georgia" data-font-package="websafe">Georgia</option><option class="font-impact " value="impact" data-font-package="websafe">Impact</option><option class="font-lucida_console " value="lucida_console" data-font-package="websafe">Lucida Console</option><option class="font-lucida_sans " value="lucida_sans" data-font-package="websafe">Lucida Sans</option><option class="font-palatino " value="palatino" data-font-package="websafe">Palatino Linotype</option><option class="font-times_new_roman " value="times_new_roman" data-font-package="websafe">Times New Roman</option><option class="font-trebuchet " value="trebuchet" data-font-package="websafe">Trebuchet</option></optgroup></dropdownoptions>
|
||||||
</font>
|
</font>
|
||||||
<!-- Per-element font overrides (type "fontselect", rendered by options/options.twig):
|
<!-- Prompt U: the "Fonts" tab is rendered as "Fonts and colors" with a special
|
||||||
each dropdown offers the SAME choices as the base "font" dropdown above
|
layout (options.twig): TOP ROW column 1 = font, fontcolor, fontsize;
|
||||||
(bundled + variant-custom + browser fonts), plus a first option
|
column 2 = primarycolor, secondarycolor (both moved here from the Colors
|
||||||
"Same as base font" (value "base" = no extra class, the element simply
|
category); then an <hr>; then per-element combo rows (fontselect +
|
||||||
inherits the body font). The chosen value is applied as the class
|
textcolor dropdown + conditional textcolorcustom picker); then the
|
||||||
font-<value> on the element in the views (nav_bar, progress_bar,
|
size/weight options below. HOUSE-STYLE: fontcolor, primarycolor and
|
||||||
question_text_container, answers, help, group_name, group_desc,
|
secondarycolor are set per variant via variants/<client>.json. -->
|
||||||
navigator). Default "base" for all of them. -->
|
<fontcolor type="colorpicker" category="Fonts" width="12" title="Default font color (body text)" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
|
||||||
<headerfont type="fontselect" category="Fonts" width="4" title="Font for the header / top menu">base</headerfont>
|
|
||||||
<progressbarfont type="fontselect" category="Fonts" width="4" title="Font for the progress bar">base</progressbarfont>
|
|
||||||
<questiontitlefont type="fontselect" category="Fonts" width="4" title="Font for question titles">base</questiontitlefont>
|
|
||||||
<answersfont type="fontselect" category="Fonts" width="4" title="Font for answers and help texts">base</answersfont>
|
|
||||||
<grouptitlefont type="fontselect" category="Fonts" width="4" title="Font for group titles">base</grouptitlefont>
|
|
||||||
<groupdescriptionfont type="fontselect" category="Fonts" width="4" title="Font for group descriptions">base</groupdescriptionfont>
|
|
||||||
<buttonsfont type="fontselect" category="Fonts" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
|
|
||||||
<fontsize type="buttons" category="Fonts" width="12" title="Base font size" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|Extra large (20 px)">16px</fontsize>
|
<fontsize type="buttons" category="Fonts" width="12" title="Base font size" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|Extra large (20 px)">16px</fontsize>
|
||||||
|
<primarycolor type="colorpicker" category="Fonts" width="12" title="Primary color" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
|
||||||
|
<secondarycolor type="colorpicker" category="Fonts" width="12" title="Secondary color" options="on|off" optionlabels="Yes|No">#888888</secondarycolor>
|
||||||
|
<!-- 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
|
||||||
|
first option "Same as base font" (value "base" = no extra class, the
|
||||||
|
element inherits the body font). Applied as class font-<value> on the
|
||||||
|
element in the views (nav_bar, progress_bar, question_text_container,
|
||||||
|
answers, help, group_name, group_desc, navigator). Default "base".
|
||||||
|
- <el>textcolor (dropdown): text color mode for that element —
|
||||||
|
default|primary|secondary|other (default "default" = the body font
|
||||||
|
color fontcolor). Resolved to an inline style="color: …" in the views.
|
||||||
|
- <el>textcolorcustom (colorpicker): only visible when <el>textcolor
|
||||||
|
= "other" (parent show-value "other"). -->
|
||||||
|
<headerfont type="fontselect" category="Fonts" width="4" title="Font for the header / top menu">base</headerfont>
|
||||||
|
<headertextcolor type="dropdown" category="Fonts" width="12" title="Text color for the header / top menu" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions><option value="default">Default font color</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></headertextcolor>
|
||||||
|
<headertextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for the header / top menu" parent="headertextcolor">#444444</headertextcolorcustom>
|
||||||
|
<progressbarfont type="fontselect" category="Fonts" width="4" title="Font for the progress bar">base</progressbarfont>
|
||||||
|
<progressbartextcolor type="dropdown" category="Fonts" width="12" title="Text color for the progress bar" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions><option value="default">Default font color</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></progressbartextcolor>
|
||||||
|
<progressbartextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for the progress bar" parent="progressbartextcolor">#444444</progressbartextcolorcustom>
|
||||||
|
<questiontitlefont type="fontselect" category="Fonts" width="4" title="Font for question titles">base</questiontitlefont>
|
||||||
|
<questiontitletextcolor type="dropdown" category="Fonts" 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">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="Fonts" width="12" title="Custom text color for question titles" parent="questiontitletextcolor">#444444</questiontitletextcolorcustom>
|
||||||
|
<answersfont type="fontselect" category="Fonts" width="4" title="Font for answers and help texts">base</answersfont>
|
||||||
|
<answerstextcolor type="dropdown" category="Fonts" 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">Default font color</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></answerstextcolor>
|
||||||
|
<answerstextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for answers and help texts" parent="answerstextcolor">#444444</answerstextcolorcustom>
|
||||||
|
<grouptitlefont type="fontselect" category="Fonts" width="4" title="Font for group titles">base</grouptitlefont>
|
||||||
|
<grouptitletextcolor type="dropdown" category="Fonts" width="12" title="Text color for group titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions><option value="default">Default font color</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></grouptitletextcolor>
|
||||||
|
<grouptitletextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for group titles" parent="grouptitletextcolor">#444444</grouptitletextcolorcustom>
|
||||||
|
<groupdescriptionfont type="fontselect" category="Fonts" width="4" title="Font for group descriptions">base</groupdescriptionfont>
|
||||||
|
<groupdescriptiontextcolor type="dropdown" category="Fonts" width="12" title="Text color for group descriptions" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||||
|
<dropdownoptions><option value="default">Default font color</option><option value="primary">Primary color</option><option value="secondary">Secondary color</option><option value="other">Other…</option></dropdownoptions></groupdescriptiontextcolor>
|
||||||
|
<groupdescriptiontextcolorcustom type="colorpicker" category="Fonts" width="12" title="Custom text color for group descriptions" parent="groupdescriptiontextcolor">#444444</groupdescriptiontextcolorcustom>
|
||||||
|
<buttonsfont type="fontselect" category="Fonts" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
|
||||||
|
<buttonstextcolor type="dropdown" category="Fonts" 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">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="Fonts" width="12" title="Custom text color for the buttons (Previous/Next/Submit)" parent="buttonstextcolor">#444444</buttonstextcolorcustom>
|
||||||
<questiontitlefontsize type="buttons" category="Fonts" 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>
|
<questiontitlefontsize type="buttons" category="Fonts" 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="Fonts" width="6" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
<questiontitlefontweight type="buttons" category="Fonts" width="6" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
||||||
<grouptitlefontsize type="buttons" category="Fonts" 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>
|
<grouptitlefontsize type="buttons" category="Fonts" 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>
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,11 @@ For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig
|
||||||
inherits the body font (body gets font-<base font>). Applied on #survey-nav,
|
inherits the body font (body gets font-<base font>). Applied on #survey-nav,
|
||||||
so it covers the menu items and the survey name as well. #}
|
so it covers the menu items and the survey name as well. #}
|
||||||
{% set sHeaderFont = aSurveyInfo.options.headerfont|default('base') %}
|
{% set sHeaderFont = aSurveyInfo.options.headerfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
primarycolor, secondary -> secondarycolor, other -> headertextcolorcustom.
|
||||||
|
Emitted as an inline style on #survey-nav below. #}
|
||||||
|
{% set sHeaderTextColorMode = aSurveyInfo.options.headertextcolor|default('default') %}
|
||||||
|
{% set sHeaderTextColor = sHeaderTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sHeaderTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sHeaderTextColorMode == 'other' ? aSurveyInfo.options.headertextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||||
{# THEME ADDITION: sticky header per screen size (options
|
{# THEME ADDITION: sticky header per screen size (options
|
||||||
headersticky{computer,tablet,mobile}; Prompt L — the master key no longer
|
headersticky{computer,tablet,mobile}; Prompt L — the master key no longer
|
||||||
counts). When the checkbox options exist (theme was reset after adding
|
counts). When the checkbox options exist (theme was reset after adding
|
||||||
|
|
@ -74,7 +79,7 @@ For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig
|
||||||
the media queries instead. Before a reset the old behaviour (always
|
the media queries instead. Before a reset the old behaviour (always
|
||||||
fixed-top) is kept as fallback. #}
|
fixed-top) is kept as fallback. #}
|
||||||
{% set bStickyConfigured = aSurveyInfo.options.headerstickycomputer is defined %}
|
{% set bStickyConfigured = aSurveyInfo.options.headerstickycomputer is defined %}
|
||||||
<div id="survey-nav" class="navbar {{ navClass }} navbar-expand-md {% if not bStickyConfigured %}fixed-top{% endif %} border-bottom pt-0 pb-0 {% if sHeaderFont != 'base' %}font-{{ sHeaderFont }}{% endif %}">
|
<div id="survey-nav" class="navbar {{ navClass }} navbar-expand-md {% if not bStickyConfigured %}fixed-top{% endif %} border-bottom pt-0 pb-0 {% if sHeaderFont != 'base' %}font-{{ sHeaderFont }}{% endif %}"{% if sHeaderTextColor != '' %} style="color: {{ sHeaderTextColor }};"{% endif %}>
|
||||||
<div class="container-fluid d-flex align-items-center">
|
<div class="container-fluid d-flex align-items-center">
|
||||||
{% if ShowMenu %}
|
{% if ShowMenu %}
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar"
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar"
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,18 @@
|
||||||
type fontselect). Value "base" = same as the base font: no extra class is put
|
type fontselect). Value "base" = same as the base font: no extra class is put
|
||||||
on the element here, it inherits the body font (body gets font-<base font>). #}
|
on the element here, it inherits the body font (body gets font-<base font>). #}
|
||||||
{% set sProgressBarFont = aSurveyInfo.options.progressbarfont|default('base') %}
|
{% set sProgressBarFont = aSurveyInfo.options.progressbarfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
primarycolor, secondary -> secondarycolor, other -> progressbartextcolorcustom.
|
||||||
|
Emitted as an inline style on the element below. #}
|
||||||
|
{% set sProgressBarTextColorMode = aSurveyInfo.options.progressbartextcolor|default('default') %}
|
||||||
|
{% set sProgressBarTextColor = sProgressBarTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sProgressBarTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sProgressBarTextColorMode == 'other' ? aSurveyInfo.options.progressbartextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||||
{% if aSurveyInfo.showprogress == 'Y' and aSurveyInfo.format != 'A' and not aSurveyInfo.aCompleted %}
|
{% if aSurveyInfo.showprogress == 'Y' and aSurveyInfo.format != 'A' and not aSurveyInfo.aCompleted %}
|
||||||
<!-- Top container -->
|
<!-- Top container -->
|
||||||
<aside class="{{ aSurveyInfo.class.topcontainer }} space-col" {{ aSurveyInfo.attr.topcontainer }} >
|
<aside class="{{ aSurveyInfo.class.topcontainer }} space-col" {{ aSurveyInfo.attr.topcontainer }} >
|
||||||
<div class="{{ aSurveyInfo.class.topcontent }} container-fluid" {{ aSurveyInfo.attr.topcontent }} >
|
<div class="{{ aSurveyInfo.class.topcontent }} container-fluid" {{ aSurveyInfo.attr.topcontent }} >
|
||||||
{% set progressValue = aSurveyInfo.progress.value %}
|
{% set progressValue = aSurveyInfo.progress.value %}
|
||||||
<div class="visually-hidden">{{ sprintf(gT('You have completed %s%% of this survey'),progressValue) }}</div>
|
<div class="visually-hidden">{{ sprintf(gT('You have completed %s%% of this survey'),progressValue) }}</div>
|
||||||
<div class="{{ aSurveyInfo.class.progress }} {% if sProgressBarFont != 'base' %}font-{{ sProgressBarFont }}{% endif %}" {{ aSurveyInfo.attr.progress }} aria-hidden="true">
|
<div class="{{ aSurveyInfo.class.progress }} {% if sProgressBarFont != 'base' %}font-{{ sProgressBarFont }}{% endif %}" {% if sProgressBarTextColor != '' %}style="color: {{ sProgressBarTextColor }};"{% endif %} {{ aSurveyInfo.attr.progress }} aria-hidden="true">
|
||||||
<div class="{{ aSurveyInfo.class.progressbar }}" {{ aSurveyInfo.attr.progressbar }} style="min-width: 2em; width: {{ progressValue }}%;">
|
<div class="{{ aSurveyInfo.class.progressbar }}" {{ aSurveyInfo.attr.progressbar }} style="min-width: 2em; width: {{ progressValue }}%;">
|
||||||
{{ progressValue }}%
|
{{ progressValue }}%
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,14 @@
|
||||||
option "buttonsfont", type fontselect. The class goes on the navigator container,
|
option "buttonsfont", type fontselect. The class goes on the navigator container,
|
||||||
the buttons inherit it. "base" = same as the base font: no extra class. #}
|
the buttons inherit it. "base" = same as the base font: no extra class. #}
|
||||||
{% set sButtonsFont = aSurveyInfo.options.buttonsfont|default('base') %}
|
{% set sButtonsFont = aSurveyInfo.options.buttonsfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
primarycolor, secondary -> secondarycolor, other -> buttonstextcolorcustom.
|
||||||
|
Emitted as an inline style on the element below. #}
|
||||||
|
{% set sButtonsTextColorMode = aSurveyInfo.options.buttonstextcolor|default('default') %}
|
||||||
|
{% set sButtonsTextColor = sButtonsTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sButtonsTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sButtonsTextColorMode == 'other' ? aSurveyInfo.options.buttonstextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||||
|
|
||||||
<!-- PRESENT THE NAVIGATOR -->
|
<!-- PRESENT THE NAVIGATOR -->
|
||||||
<div class="{{ aSurveyInfo.class.navigatorcontainer }} row navigator space-col {% if sButtonsFont != 'base' %}font-{{ sButtonsFont }}{% endif %}" id="{{ aSurveyInfo.id.navigatorcontainer }}" {{ aSurveyInfo.attr.navigatorcontainer }}>
|
<div class="{{ aSurveyInfo.class.navigatorcontainer }} row navigator space-col {% if sButtonsFont != 'base' %}font-{{ sButtonsFont }}{% endif %}" {% if sButtonsTextColor != '' %}style="color: {{ sButtonsTextColor }};"{% endif %} id="{{ aSurveyInfo.id.navigatorcontainer }}" {{ aSurveyInfo.attr.navigatorcontainer }}>
|
||||||
|
|
||||||
<!-- Previous button container -->
|
<!-- Previous button container -->
|
||||||
<div class="{{ aSurveyInfo.class.navigatorbuttonl }} col-6 text-start" {{ aSurveyInfo.attr.navigatorbuttonl }}>
|
<div class="{{ aSurveyInfo.class.navigatorbuttonl }} col-6 text-start" {{ aSurveyInfo.attr.navigatorbuttonl }}>
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,16 @@
|
||||||
"groupdescriptionfont", type fontselect). "base" = same as the base font:
|
"groupdescriptionfont", type fontselect). "base" = same as the base font:
|
||||||
no extra class, inherits body font. #}
|
no extra class, inherits body font. #}
|
||||||
{% set sGroupDescFont = aSurveyInfo.options.groupdescriptionfont|default('base') %}
|
{% set sGroupDescFont = aSurveyInfo.options.groupdescriptionfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
primarycolor, secondary -> secondarycolor, other -> groupdescriptiontextcolorcustom.
|
||||||
|
Emitted as an inline style on the element below. #}
|
||||||
|
{% set sGroupDescTextColorMode = aSurveyInfo.options.groupdescriptiontextcolor|default('default') %}
|
||||||
|
{% set sGroupDescTextColor = sGroupDescTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sGroupDescTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sGroupDescTextColorMode == 'other' ? aSurveyInfo.options.groupdescriptiontextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||||
|
|
||||||
{% if aGroup.showgroupinfo == 'D' or aGroup.showgroupinfo == 'B' %}
|
{% if aGroup.showgroupinfo == 'D' or aGroup.showgroupinfo == 'B' %}
|
||||||
{% if aGroup.description != '' %}
|
{% if aGroup.description != '' %}
|
||||||
<!-- Group description -->
|
<!-- Group description -->
|
||||||
<div class="{{ aSurveyInfo.class.groupdesc }} {% if sGroupDescFont != 'base' %}font-{{ sGroupDescFont }}{% endif %}" {{ aSurveyInfo.attr.groupdesc }}>
|
<div class="{{ aSurveyInfo.class.groupdesc }} {% if sGroupDescFont != 'base' %}font-{{ sGroupDescFont }}{% endif %}" {% if sGroupDescTextColor != '' %}style="color: {{ sGroupDescTextColor }};"{% endif %} {{ aSurveyInfo.attr.groupdesc }}>
|
||||||
<div>
|
<div>
|
||||||
{{ processString(aGroup.description) }}
|
{{ processString(aGroup.description) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,13 @@
|
||||||
{# THEME ADDITION: font for the group title (config.xml option "grouptitlefont",
|
{# THEME ADDITION: font for the group title (config.xml option "grouptitlefont",
|
||||||
type fontselect). "base" = same as the base font: no extra class, inherits body font. #}
|
type fontselect). "base" = same as the base font: no extra class, inherits body font. #}
|
||||||
{% set sGroupTitleFont = aSurveyInfo.options.grouptitlefont|default('base') %}
|
{% set sGroupTitleFont = aSurveyInfo.options.grouptitlefont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
primarycolor, secondary -> secondarycolor, other -> grouptitletextcolorcustom.
|
||||||
|
Emitted as an inline style on the element below. #}
|
||||||
|
{% set sGroupTitleTextColorMode = aSurveyInfo.options.grouptitletextcolor|default('default') %}
|
||||||
|
{% set sGroupTitleTextColor = sGroupTitleTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sGroupTitleTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sGroupTitleTextColorMode == 'other' ? aSurveyInfo.options.grouptitletextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||||
{% if aGroup.showgroupinfo == 'N' or aGroup.showgroupinfo == 'B' %}
|
{% if aGroup.showgroupinfo == 'N' or aGroup.showgroupinfo == 'B' %}
|
||||||
<div class="{{ aSurveyInfo.class.grouptitle }} text-center h3 space-col {% if sGroupTitleFont != 'base' %}font-{{ sGroupTitleFont }}{% endif %}" {{ aSurveyInfo.attr.grouptitle }}>
|
<div class="{{ aSurveyInfo.class.grouptitle }} text-center h3 space-col {% if sGroupTitleFont != 'base' %}font-{{ sGroupTitleFont }}{% endif %}" {% if sGroupTitleTextColor != '' %}style="color: {{ sGroupTitleTextColor }};"{% endif %} {{ aSurveyInfo.attr.grouptitle }}>
|
||||||
{{ processString(aGroup.name, false, 3, {'GID': aGroup.gid}) }}
|
{{ processString(aGroup.name, false, 3, {'GID': aGroup.gid}) }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,14 @@
|
||||||
{# THEME ADDITION: font for the answers (config.xml option "answersfont", type
|
{# THEME ADDITION: font for the answers (config.xml option "answersfont", type
|
||||||
fontselect). "base" = same as the base font: no extra class, inherits body font. #}
|
fontselect). "base" = same as the base font: no extra class, inherits body font. #}
|
||||||
{% set sAnswersFont = aSurveyInfo.options.answersfont|default('base') %}
|
{% set sAnswersFont = aSurveyInfo.options.answersfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
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(''))) %}
|
||||||
|
|
||||||
<!-- Answer -->
|
<!-- Answer -->
|
||||||
<div class="{{ aSurveyInfo.class.answercontainer }} col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {{ aSurveyInfo.attr.answercontainer }}>
|
<div class="{{ aSurveyInfo.class.answercontainer }} col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {% if sAnswersTextColor != '' %}style="color: {{ sAnswersTextColor }};"{% endif %} {{ aSurveyInfo.attr.answercontainer }}>
|
||||||
{# NOTE: If you want to customize the question rendering, use a question theme #}
|
{# NOTE: If you want to customize the question rendering, use a question theme #}
|
||||||
{{ aQuestion.answer | raw }}
|
{{ aQuestion.answer | raw }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,13 @@
|
||||||
"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 ->
|
||||||
|
primarycolor, secondary -> secondarycolor, other -> questiontitletextcolorcustom.
|
||||||
|
Emitted as an inline style on the element below. #}
|
||||||
|
{% set sQuestionTitleTextColorMode = aSurveyInfo.options.questiontitletextcolor|default('default') %}
|
||||||
|
{% set sQuestionTitleTextColor = sQuestionTitleTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sQuestionTitleTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sQuestionTitleTextColorMode == 'other' ? aSurveyInfo.options.questiontitletextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||||
|
|
||||||
<!-- Question text -->
|
<!-- Question text -->
|
||||||
<div class="{{ aSurveyInfo.class.questiontitlecontainer }} col-12 {% if sQuestionTitleFont != 'base' %}font-{{ sQuestionTitleFont }}{% 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 }} >
|
||||||
{{ include('./subviews/survey/question_subviews/question_text_content.twig') }}
|
{{ include('./subviews/survey/question_subviews/question_text_content.twig') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,14 @@
|
||||||
{# THEME ADDITION: help texts use the answers font (config.xml option "answersfont",
|
{# THEME ADDITION: help texts use the answers font (config.xml option "answersfont",
|
||||||
type fontselect). "base" = same as the base font: no extra class, inherits body font. #}
|
type fontselect). "base" = same as the base font: no extra class, inherits body font. #}
|
||||||
{% set sAnswersFont = aSurveyInfo.options.answersfont|default('base') %}
|
{% set sAnswersFont = aSurveyInfo.options.answersfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
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(''))) %}
|
||||||
|
|
||||||
<!-- Survey question help -->
|
<!-- Survey question help -->
|
||||||
<div class="{{ aSurveyInfo.class.helpcontainer }} text-info col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {{ aSurveyInfo.attr.helpcontainer }}>
|
<div class="{{ aSurveyInfo.class.helpcontainer }} text-info col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {% if sAnswersTextColor != '' %}style="color: {{ sAnswersTextColor }};"{% endif %} {{ aSurveyInfo.attr.helpcontainer }}>
|
||||||
{% if aQuestion.help.show %}
|
{% if aQuestion.help.show %}
|
||||||
<div class="{{ aSurveyInfo.class.lsquestionhelp }}">
|
<div class="{{ aSurveyInfo.class.lsquestionhelp }}">
|
||||||
{{ aQuestion.help.text | raw }}
|
{{ aQuestion.help.text | raw }}
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,14 @@
|
||||||
(config.xml option "answersfont", type fontselect). "base" = same as the base
|
(config.xml option "answersfont", type fontselect). "base" = same as the base
|
||||||
font: no extra class, inherits body font. #}
|
font: no extra class, inherits body font. #}
|
||||||
{% set sAnswersFont = aSurveyInfo.options.answersfont|default('base') %}
|
{% set sAnswersFont = aSurveyInfo.options.answersfont|default('base') %}
|
||||||
|
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||||
|
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(''))) %}
|
||||||
|
|
||||||
<!-- LimeSurvey valid message and help -->
|
<!-- LimeSurvey valid message and help -->
|
||||||
<div class="{{ aSurveyInfo.class.questionvalidcontainer }} text-info col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {{ aSurveyInfo.attr.questionvalidcontainer }}>
|
<div class="{{ aSurveyInfo.class.questionvalidcontainer }} text-info col-12 {% if sAnswersFont != 'base' %}font-{{ sAnswersFont }}{% endif %}" {% if sAnswersTextColor != '' %}style="color: {{ sAnswersTextColor }};"{% endif %} {{ aSurveyInfo.attr.questionvalidcontainer }}>
|
||||||
{{ aQuestion.valid_message | raw }} {# The validation message, eg: "Only numbers may be entered in this field.". This text is inside EM Helper, and can be changed by creating a translation file #}
|
{{ aQuestion.valid_message | raw }} {# The validation message, eg: "Only numbers may be entered in this field.". This text is inside EM Helper, and can be changed by creating a translation file #}
|
||||||
{{ aQuestion.man_message | raw }} {# The question mandatory error message: "This question is mandatory!". This text is inside EM Helper, and can be changed by creating a translation file #}
|
{{ aQuestion.man_message | raw }} {# The question mandatory error message: "This question is mandatory!". This text is inside EM Helper, and can be changed by creating a translation file #}
|
||||||
{{ aQuestion.file_valid_message | raw }} {# Used only for file upload question type... TODO: check if we can remove it and use valid_message for file upload question type too #}
|
{{ aQuestion.file_valid_message | raw }} {# Used only for file upload question type... TODO: check if we can remove it and use valid_message for file upload question type too #}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue