vanilla_respondage/views/subviews/header/custom_header.twig

405 lines
23 KiB
Twig
Raw Normal View History

2026-06-17 10:06:07 +02:00
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· Custom Header ·._.·´¯)·._.·´¯)
If you extend a template, and want to add custom headers (js, css, scripts, meta etc), you'd rather do it here.
#}
{# Custom logo option #}
{# Custom backgroud option #}
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{# Row 135/149: resolve a color-chooser MODE value to the effective color — used for
headerbackgroundcolor, the progress bar colors and bodybackgroundcolor below
(navbarfontcolor keeps its own inline expression further down). Modes: default|defaultbackgroundcolor|
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
color1|color2|color3|other, or a raw hex (legacy stored value) which passes
through directly. Row 180 / plan P2: legacy modes "primary"/"secondary" of the
old 4-way <el>textcolor dropdowns map to color1/color2 as well. #}
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{% macro cm(mode, custom, opts) -%}
{%- set m = mode|default('') -%}
{{- m matches '/^#[0-9a-fA-F]{3,8}$/' ? m : (m == 'color1' or m == 'primary' ? opts.primarycolor|default('') : (m == 'color2' or m == 'secondary' ? opts.secondarycolor|default('') : (m == 'color3' ? opts.tertiarycolor|default('') : (m == 'defaultbackgroundcolor' ? opts.defaultbackgroundcolor|default('') : (m == 'other' ? custom|default('') : opts.fontcolor|default('')))))) -}}
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{%- endmacro %}
{# Row 191 / row 178 plan P6: like cm(), but for BACKGROUND choosers — mode
"default" means "no override" (empty string), so the Bootstrap button default
(btn-primary / btn-outline-secondary) stays; all other modes resolve the same
way as cm(). Used for the per-button background colors of the navigator. #}
{% macro cmbg(mode, custom, opts) -%}
{%- set m = mode|default('') -%}
{{- m matches '/^#[0-9a-fA-F]{3,8}$/' ? m : (m == 'color1' or m == 'primary' ? opts.primarycolor|default('') : (m == 'color2' or m == 'secondary' ? opts.secondarycolor|default('') : (m == 'color3' ? opts.tertiarycolor|default('') : (m == 'defaultbackgroundcolor' ? opts.defaultbackgroundcolor|default('') : (m == 'other' ? custom|default('') : ''))))) -}}
{%- endmacro %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{% import _self as cmm %}
2026-06-17 10:06:07 +02:00
<style>
html, body {
font-size: {{ aSurveyInfo.options.fontsize }} !important;
}
{% if (aSurveyInfo.options.backgroundimage == "on" and imageSrc(aSurveyInfo.options.backgroundimagefile )) %}
body {
background-image: url({{ imageSrc(aSurveyInfo.options.backgroundimagefile ) }});
background-attachment: {{ aSurveyInfo.options.backgroundimagefixed }};
background-size: {{ aSurveyInfo.options.backgroundimagedisplay }};
}
body .top-container {
background-color: rgba(236, 240, 241, 0.2);
}
{% endif %}
body {
padding-bottom: 10px;
/*padding-top: 60px;!* now is redefine in JS to fit any title length *!*/
background-color:{{ cmm.cm(aSurveyInfo.options.bodybackgroundcolor|default('defaultbackgroundcolor'), aSurveyInfo.options.bodybackgroundcolorcustom|default(''), aSurveyInfo.options) }} ;
2026-06-17 10:06:07 +02:00
color: {{ aSurveyInfo.options.fontcolor }};
}
{# Row 207: the theme footer "Proudly developed by [logo]" — text in the default
(body) font at the BASE font size, in Color 2 (secondarycolor); the logo
height 25px is static in css/custom.css. The footer itself is rendered by
views/subviews/footer/footer.twig on every page except the welcome page. #}
.respondage-theme-footer {
font-size: {{ aSurveyInfo.options.fontsize|default('16px') }};
color: {{ aSurveyInfo.options.secondarycolor|default('#ef476f') }};
}
2026-06-17 10:06:07 +02:00
.table {
color: {{ aSurveyInfo.options.fontcolor }};
}
{# Row 180 / plan P2: the question title now uses the color-chooser scheme —
questiontitletextcolor + questiontitletextcolorcustom (text) and
questiontitlebackgroundcolor + questiontitlebackgroundcolorcustom
(background), resolved via cm() (default modes: text "other" per row 178,
background "color1"; legacy stored hex passes through). The CHOOSER wins
when the mode key exists in the stored options; a row from before P2 (no
questiontitletextcolor key) falls back to the legacy plain picker
questiontitlefontcolor. questiontitlefontoptions (normal|bold|italic|
bolditalic) replaces questiontitlefontweight (400|700) — a legacy stored
weight is mapped like the group title/description (row 157). #}
{% set sQTitleFontOptions = aSurveyInfo.options.questiontitlefontoptions|default(aSurveyInfo.options.questiontitlefontweight|default('700') == '700' ? 'bold' : 'normal') %}
{% set sQTitleBackgroundColor = cmm.cm(aSurveyInfo.options.questiontitlebackgroundcolor|default('color1'), aSurveyInfo.options.questiontitlebackgroundcolorcustom|default(''), aSurveyInfo.options) %}
{% set sQTitleTextColor = aSurveyInfo.options.questiontitletextcolor is defined ? cmm.cm(aSurveyInfo.options.questiontitletextcolor, aSurveyInfo.options.questiontitletextcolorcustom|default(''), aSurveyInfo.options) : aSurveyInfo.options.questiontitlefontcolor|default('') %}
2026-06-17 10:06:07 +02:00
.question-title-container {
font-size: {{ aSurveyInfo.options.questiontitlefontsize }};
font-weight: {{ sQTitleFontOptions == 'bold' or sQTitleFontOptions == 'bolditalic' ? '700' : '400' }};
font-style: {{ sQTitleFontOptions == 'italic' or sQTitleFontOptions == 'bolditalic' ? 'italic' : 'normal' }};
background: {{ sQTitleBackgroundColor }};
color: {{ sQTitleTextColor }};
2026-06-17 10:06:07 +02:00
}
{# Row 157: group title/description font OPTIONS (config.xml <el>fontoptions:
normal|bold|italic|bolditalic) mapped to font-weight + font-style. Until the
theme is reset, a legacy stored <el>fontweight ("400"/"700") is mapped onto
the new values; the defaults keep the old look (title bold, description normal). #}
{% set sGroupTitleFontOptions = aSurveyInfo.options.grouptitlefontoptions|default(aSurveyInfo.options.grouptitlefontweight|default('700') == '700' ? 'bold' : 'normal') %}
{% set sGroupDescFontOptions = aSurveyInfo.options.groupdescriptionfontoptions|default(aSurveyInfo.options.groupdescriptionfontweight|default('400') == '700' ? 'bold' : 'normal') %}
2026-06-17 10:06:07 +02:00
.group-title {
font-size: {{ aSurveyInfo.options.grouptitlefontsize }};
font-weight: {{ sGroupTitleFontOptions == 'bold' or sGroupTitleFontOptions == 'bolditalic' ? '700' : '400' }};
font-style: {{ sGroupTitleFontOptions == 'italic' or sGroupTitleFontOptions == 'bolditalic' ? 'italic' : 'normal' }};
2026-06-17 10:06:07 +02:00
}
.group-description {
font-size: {{ aSurveyInfo.options.groupdescriptionfontsize }};
font-weight: {{ sGroupDescFontOptions == 'bold' or sGroupDescFontOptions == 'bolditalic' ? '700' : '400' }};
font-style: {{ sGroupDescFontOptions == 'italic' or sGroupDescFontOptions == 'bolditalic' ? 'italic' : 'normal' }};
2026-06-17 10:06:07 +02:00
}
.privacy-block, .privacy .form-check {
background-color: {{ aSurveyInfo.options.privacybackgroundcolor }};
}
{% if ( aSurveyInfo.options.brandlogofile|default('off') not in ['off', '', 'inherit'] and aSurveyInfo.options.brandlogo|default('on') != 'off' ) %}
2026-06-17 10:06:07 +02:00
body .top-container {
margin-top: 0;
}
{% endif %}
{# Row 179 / plan P1: distances in the Questions tab ("Overall question" section).
Free text in px or rem (default 30px); only emitted when the value matches
^<number>(px|rem)$ — anything else falls back to 30px. questiondistance is
the margin-bottom between two question containers (parent theme.css uses
2em), questiondistancebottom the margin-top of the bottom navigator with
the Previous/Next/Submit buttons. #}
{% set sQuestionDistance = aSurveyInfo.options.questiondistance|default('30px') %}
{% set sQuestionDistanceBottom = aSurveyInfo.options.questiondistancebottom|default('30px') %}
.question-container {
margin-bottom: {{ sQuestionDistance matches '/^\\d+(\\.\\d+)?(px|rem)$/' ? sQuestionDistance : '30px' }};
}
#navigator-container {
margin-top: {{ sQuestionDistanceBottom matches '/^\\d+(\\.\\d+)?(px|rem)$/' ? sQuestionDistanceBottom : '30px' }};
}
2026-06-17 10:06:07 +02:00
{% if (aSurveyInfo.options.questionborder == "box" ) %}
.question-container,
#welcome-container,
.save-form,
#surveys-list-container,
.privacy {
border: 1px {{ aSurveyInfo.options.questionborderstyle }} {{ cmm.cm(aSurveyInfo.options.questionbordercolor|default('default'), aSurveyInfo.options.questionbordercolorcustom|default('#cccccc'), aSurveyInfo.options) }};
2026-06-17 10:06:07 +02:00
}
{% endif %}
{% if (aSurveyInfo.options.questionborder == "top" ) %}
.question-container,
#welcome-container,
.save-form,
#surveys-list-container,
.privacy {
border-top: 1px {{ aSurveyInfo.options.questionborderstyle }} {{ cmm.cm(aSurveyInfo.options.questionbordercolor|default('default'), aSurveyInfo.options.questionbordercolorcustom|default('#cccccc'), aSurveyInfo.options) }};
2026-06-17 10:06:07 +02:00
}
{% endif %}
{% if (aSurveyInfo.options.questionborder == "none" ) %}
.question-container,
#welcome-container,
.save-form,
#surveys-list-container,
.privacy {
border: none;
}
{% endif %}
{# Row 201: the border radii are duration options — the stored value already
carries the unit ("5px", "0.5rem"), so emit it AS-IS. (Appending "px" here
rendered "5pxpx" — an invalid declaration the browser silently drops, so no
radius showed in the survey at all.) Values not matching <number>(px|rem)
fall back to 5px. The regex deliberately uses [0-9] and [.] instead of
backslash escapes to avoid twig-string/PCRE escaping pitfalls. #}
{% set sRadiusTL = aSurveyInfo.options.questionborderradiusTL|default('5px') %}
{% set sRadiusTR = aSurveyInfo.options.questionborderradiusTR|default('5px') %}
{% set sRadiusBR = aSurveyInfo.options.questionborderradiusBR|default('5px') %}
{% set sRadiusBL = aSurveyInfo.options.questionborderradiusBL|default('5px') %}
{% set sRadiusTL = sRadiusTL matches '/^[0-9]+([.][0-9]+)?(px|rem)$/' ? sRadiusTL : '5px' %}
{% set sRadiusTR = sRadiusTR matches '/^[0-9]+([.][0-9]+)?(px|rem)$/' ? sRadiusTR : '5px' %}
{% set sRadiusBR = sRadiusBR matches '/^[0-9]+([.][0-9]+)?(px|rem)$/' ? sRadiusBR : '5px' %}
{% set sRadiusBL = sRadiusBL matches '/^[0-9]+([.][0-9]+)?(px|rem)$/' ? sRadiusBL : '5px' %}
2026-06-17 10:06:07 +02:00
.question-container,
#welcome-container,
.save-form,
#surveys-list-container,
.privacy {
border-radius: {{ sRadiusTL }} {{ sRadiusTR }} {{ sRadiusBR }} {{ sRadiusBL }};
2026-06-17 10:06:07 +02:00
}
.question-title-container{
border-radius: {{ sRadiusTL }} {{ sRadiusTR }} 0 0;
2026-06-17 10:06:07 +02:00
}
{% if (aSurveyInfo.options.questiondropdown == "on" ) %}
.question-container,
#welcome-container,
.privacy-block,
.save-form,
#surveys-list-container {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
}
.privacy{
margin-top:30px;
}
{% endif %}
{% if (aSurveyInfo.options.questiondropdown == "hover" ) %}
.question-container:hover,
#welcome-container:hover,
.save-form:hover,
#surveys-list-container:hover,
.privacy:hover {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
}
.privacy{
margin-top:30px;
}
{% endif %}
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{# Row 135: headerbackgroundcolor is a MODE dropdown now (see navbarfontcolor
below) — resolve the effective color via the shared partial. Default mode
"defaultbackgroundcolor"; a legacy stored hex passes through. #}
{% set sHeaderBackgroundColor = cmm.cm(aSurveyInfo.options.headerbackgroundcolor|default('defaultbackgroundcolor'), aSurveyInfo.options.headerbackgroundcolorcustom|default(''), aSurveyInfo.options) %}
2026-06-17 10:06:07 +02:00
.navbar-light{
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
background-color: {{ sHeaderBackgroundColor }};
2026-06-17 10:06:07 +02:00
}
{# THEME ADDITION: sticky header per screen size (options
headersticky{computer,tablet,mobile}; Prompt L — the master key
"headersticky" no longer gates this). Breakpoints are Bootstrap's
defaults: phone < md (768px), tablet = md..lg (768-991px),
computer >= lg (992px). The rules are the same as Bootstrap's
.fixed-top, but only inside the selected range(s). Only emitted when
the checkbox options exist (after a theme reset); before that nav_bar.twig
keeps the fixed-top class (old behaviour). Defaults when a checkbox is
undefined: computer on, tablet on, mobile off. #}
{% if aSurveyInfo.options.headerstickycomputer is defined %}
{% if aSurveyInfo.options.headerstickycomputer|default('on') == 'on' %}
@media (min-width: 992px) { #survey-nav { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; } }
{% endif %}
{% if aSurveyInfo.options.headerstickytablet|default('on') == 'on' %}
@media (min-width: 768px) and (max-width: 991.98px) { #survey-nav { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; } }
{% endif %}
{% if aSurveyInfo.options.headerstickymobile|default('off') == 'on' %}
@media (max-width: 767.98px) { #survey-nav { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; } }
{% endif %}
{% endif %}
{# Prompt M: per-logo top margin (options <pos>logotopmargin hold a plain px
number 0-100; the "px" unit is added here. |replace({'px':''}) guards
feat(theme): default logos left/center/right + 30px top margin + 90px header bar Row 138: default look of the mother theme: - brandlogofile default -> ./files/logo-left.png (left) - centerlogofile default -> ./files/logo.png (center, was "off") - rightlogofile default -> ./files/logo-right.png (right, was "off") so all three logos are visible by default - brand/center/rightlogotopmargin defaults 15 -> 30 (px added in the view) - new option headerheight (Top of the page tab, col 3 next to the sticky checkboxes, default 90) applied in custom_header.twig as min-height on #survey-nav (min-height so taller logos can still grow the bar; the sticky body padding in scripts/custom.js follows the real nav height) - sticky defaults were already computer on / tablet on / mobile off (unchanged) Core normalizes ./files/x on theme reset to image::theme::files/x, so the config defaults keep the ./files/ style like the existing one. The PNG files logo-left.png / logo-right.png remain the owner's untracked files (Prompt PL). Verified: options render tc=633 (headerheight field present, logo dropdowns list all three files, divs balanced); live survey 282267 with the defaults applied to the DB row: three logo imgs (logo-left/logo/logo-right), padding-top 30px on all logo imgs, min-height 90px on #survey-nav, fixed-top media queries only for computer+tablet (mobile non-sticky) — DB row restored afterwards; jsdom 7/7; export exit 0. Theme reset needed for the new defaults to land in the DB. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:41:12 +01:00
against a legacy stored value that still carries the unit. Row 138
default: 30 px. Emitted as margin-top on the logo container: together with
the padding-top:0 on .logo-container / .logo-container > img and the
top-aligned header in css/plain.css (sass/plain.sass), the value is the
EXACT distance from the top of the header to the top of the logo —
0 px means the logo touches the top of the page. #}
#survey-nav .logo-left.logo-container {
margin-top: {{ aSurveyInfo.options.brandlogotopmargin|default('30')|replace({'px': ''}) }}px;
}
#survey-nav .logo-center.logo-container {
margin-top: {{ aSurveyInfo.options.centerlogotopmargin|default('30')|replace({'px': ''}) }}px;
}
#survey-nav .logo-right.logo-container {
margin-top: {{ aSurveyInfo.options.rightlogotopmargin|default('30')|replace({'px': ''}) }}px;
feat(theme): default logos left/center/right + 30px top margin + 90px header bar Row 138: default look of the mother theme: - brandlogofile default -> ./files/logo-left.png (left) - centerlogofile default -> ./files/logo.png (center, was "off") - rightlogofile default -> ./files/logo-right.png (right, was "off") so all three logos are visible by default - brand/center/rightlogotopmargin defaults 15 -> 30 (px added in the view) - new option headerheight (Top of the page tab, col 3 next to the sticky checkboxes, default 90) applied in custom_header.twig as min-height on #survey-nav (min-height so taller logos can still grow the bar; the sticky body padding in scripts/custom.js follows the real nav height) - sticky defaults were already computer on / tablet on / mobile off (unchanged) Core normalizes ./files/x on theme reset to image::theme::files/x, so the config defaults keep the ./files/ style like the existing one. The PNG files logo-left.png / logo-right.png remain the owner's untracked files (Prompt PL). Verified: options render tc=633 (headerheight field present, logo dropdowns list all three files, divs balanced); live survey 282267 with the defaults applied to the DB row: three logo imgs (logo-left/logo/logo-right), padding-top 30px on all logo imgs, min-height 90px on #survey-nav, fixed-top media queries only for computer+tablet (mobile non-sticky) — DB row restored afterwards; jsdom 7/7; export exit 0. Theme reset needed for the new defaults to land in the DB. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:41:12 +01:00
}
{# Row 138: header bar height (option headerheight, plain px number; the "px"
unit is added here, |replace guards a legacy value with the unit). Applied
as min-height so taller logos can still grow the bar — the sticky body
padding in scripts/custom.js follows the real nav height. #}
#survey-nav {
min-height: {{ aSurveyInfo.options.headerheight|default('90')|replace({'px': ''}) }}px;
}
feat(options): menu item color as preset dropdown with persistent custom color (working example) navbarfontcolor (Top of the page tab, column 2) changes from a plain colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 | Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its value across saves (data-keep-value) so switching back to 'Other' restores the last picked color. Dropdown option labels show the live hex of each preset and clickable swatch chips select a preset; an effective-color swatch next to the picker shows the color actually applied. A legacy stored hex is migrated to mode 'other' + custom field (options.js) and accepted directly in custom_header.twig, so nothing is lost before a theme reset. Views map default->fontcolor, color1/2/3->primary/secondary/tertiarycolor, other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay plain colorpickers, default #ffffff. build.php maps a legacy hex navbarfontcolor in variant jsons to other+custom for when variants are built. Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration, gray-out, keep-value on save, chips, swatches), live survey render for all 5 modes, export check exit 0. NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no customer is waiting; the on-disk variant folders were left at their pre-feature state and no variant theme was reset. Run variants/build.php per variant only after the open prompts are done. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
{# Row 115 working example: navbarfontcolor is now a MODE dropdown
(default|color1|color2|color3|other). Resolve the effective color:
default -> fontcolor, color1/2/3 -> primarycolor/secondarycolor/tertiarycolor,
other -> navbarfontcolorcustom. A raw hex value (legacy stored value from
before the dropdown existed, or a hand-set one) is used directly. #}
{% set sNavbarFontColorMode = aSurveyInfo.options.navbarfontcolor|default('default') %}
{% set sNavbarFontColor = sNavbarFontColorMode matches '/^#[0-9a-fA-F]{3,8}$/' ? sNavbarFontColorMode : (sNavbarFontColorMode == 'color1' ? aSurveyInfo.options.primarycolor|default('') : (sNavbarFontColorMode == 'color2' ? aSurveyInfo.options.secondarycolor|default('') : (sNavbarFontColorMode == 'color3' ? aSurveyInfo.options.tertiarycolor|default('') : (sNavbarFontColorMode == 'defaultbackgroundcolor' ? aSurveyInfo.options.defaultbackgroundcolor|default('') : (sNavbarFontColorMode == 'other' ? aSurveyInfo.options.navbarfontcolorcustom|default('') : aSurveyInfo.options.fontcolor|default('')))))) %}
#survey-nav .navbar-nav > li > a,
#survey-nav .navbar-nav .nav-link {
feat(options): menu item color as preset dropdown with persistent custom color (working example) navbarfontcolor (Top of the page tab, column 2) changes from a plain colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 | Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its value across saves (data-keep-value) so switching back to 'Other' restores the last picked color. Dropdown option labels show the live hex of each preset and clickable swatch chips select a preset; an effective-color swatch next to the picker shows the color actually applied. A legacy stored hex is migrated to mode 'other' + custom field (options.js) and accepted directly in custom_header.twig, so nothing is lost before a theme reset. Views map default->fontcolor, color1/2/3->primary/secondary/tertiarycolor, other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay plain colorpickers, default #ffffff. build.php maps a legacy hex navbarfontcolor in variant jsons to other+custom for when variants are built. Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration, gray-out, keep-value on save, chips, swatches), live survey render for all 5 modes, export check exit 0. NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no customer is waiting; the on-disk variant folders were left at their pre-feature state and no variant theme was reset. Run variants/build.php per variant only after the open prompts are done. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
color: {{ sNavbarFontColor }};
}
#survey-nav .navbar-nav > li > a:hover,
#survey-nav .navbar-nav > li > a:focus,
#survey-nav .navbar-nav .nav-link:hover,
#survey-nav .navbar-nav .nav-link:focus {
feat(options): menu item color as preset dropdown with persistent custom color (working example) navbarfontcolor (Top of the page tab, column 2) changes from a plain colorpicker to a dropdown: Same as default font color | Color 1 | Color 2 | Color 3 | Other. The new navbarfontcolorcustom colorpicker stays visible but grayed out (disabled + aria-disabled) unless 'Other' is chosen, and keeps its value across saves (data-keep-value) so switching back to 'Other' restores the last picked color. Dropdown option labels show the live hex of each preset and clickable swatch chips select a preset; an effective-color swatch next to the picker shows the color actually applied. A legacy stored hex is migrated to mode 'other' + custom field (options.js) and accepted directly in custom_header.twig, so nothing is lost before a theme reset. Views map default->fontcolor, color1/2/3->primary/secondary/tertiarycolor, other->navbarfontcolorcustom. headerbackgroundcolor/bodybackgroundcolor stay plain colorpickers, default #ffffff. build.php maps a legacy hex navbarfontcolor in variant jsons to other+custom for when variants are built. Verified: jsdom suite 6/6 (new options_navbar_color_mode test: migration, gray-out, keep-value on save, chips, swatches), live survey render for all 5 modes, export check exit 0. NOTE (owner 2026-11-26): variant builds are intentionally DEFERRED — no customer is waiting; the on-disk variant folders were left at their pre-feature state and no variant theme was reset. Run variants/build.php per variant only after the open prompts are done. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 13:51:55 +01:00
color: {{ sNavbarFontColor }};
opacity: 0.75;
2026-06-17 10:06:07 +02:00
}
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
{# Row 135: the progress bar colors are MODE dropdowns now — resolve via the
shared partial. Defaults: background = Default background color, bar = Color 1,
font = Default font color; legacy stored hex passes through. #}
{% set sProgressBarBackgroundColor = cmm.cm(aSurveyInfo.options.progressbarbackgroundcolor|default('defaultbackgroundcolor'), aSurveyInfo.options.progressbarbackgroundcolorcustom|default(''), aSurveyInfo.options) %}
{% set sProgressBarColor = cmm.cm(aSurveyInfo.options.progressbarcolor|default('color1'), aSurveyInfo.options.progressbarcolorcustom|default(''), aSurveyInfo.options) %}
{% set sProgressBarFontColor = cmm.cm(aSurveyInfo.options.progressbarfontcolor|default('default'), aSurveyInfo.options.progressbarfontcolorcustom|default(''), aSurveyInfo.options) %}
2026-06-17 10:06:07 +02:00
.progress {
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
background: {{ sProgressBarBackgroundColor }};
2026-06-17 10:06:07 +02:00
}
label::after,
.radio-item label::after{
background-color: {{ cmm.cm(aSurveyInfo.options.checkboxcolor|default('other'), aSurveyInfo.options.checkboxcolorcustom|default('#ff005f'), aSurveyInfo.options) }};
2026-06-17 10:06:07 +02:00
}
.progress-bar {
feat(options): roll the color-chooser scheme out to 4 more options (row 135) The experimental color-chooser (mode dropdown + swatch chips + custom picker, previously only navbarfontcolor) now also covers, with the owner-specified defaults: - headerbackgroundcolor — default "Default background color" (slot h1) - progressbarcolor — COLUMN 1 of the progress colors row (was col 2), default Color 1 - progressbarbackgroundcolor — COLUMN 2 (was col 1), default Default background color - progressbarfontcolor — column 3, default Default font color, with an extra tip underneath: "Make this font color the same color as the color of the progress bar when you do not want to see the progress in %." Each option is a dropdown (default|defaultbackgroundcolor|color1|color2|color3| other) whose own default carries data-default="1" + [ ] in config.xml, plus a <key>custom colorpicker child (parent, disable-mode, data-keep-value). options.js generalized navbarColorModeUI to colorModeUI(key) over aColorChooserKeys with shared presets, one delegated change handler for select.selector_color_mode, and per-key legacy hex migration (stored hex -> mode "other" + hex into the custom child). custom_header.twig resolves the modes via a local cm() macro (import _self, same pattern as nav_bar.twig); raw hex passes through. build.php migrates legacy hex values in variant jsons for all 5 chooser keys. OPTIONS_JS_TOKEN -> 20261126.14. Verified: render tc=618 (all 5 selects with per-option [ ] default, progress row col order, tip present, divs balanced, options.js?v=20261126.14), jsdom 7/7 incl. new options_color_choosers.test.js (5 choosers, legacy migration, chips, layout, tip) and the navbar test re-scoped to its own chips; live survey 282267 with legacy hex AND with modes (color2 -> #888888, defaultbackgroundcolor -> #ffffff; DB row restored); export exit 0; build.php lints. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-26 19:14:47 +01:00
background: {{ sProgressBarColor }};
color: {{ sProgressBarFontColor }};
2026-06-17 10:06:07 +02:00
}
{# Row 180 / plan P2: the question body background is a color chooser now
(questionbackgroundcolor, default mode "defaultbackgroundcolor", +
questionbackgroundcolorcustom for "other"); a legacy stored hex passes
through cm() directly. #}
2026-06-17 10:06:07 +02:00
.question-container, #welcome-container {
background: {{ cmm.cm(aSurveyInfo.options.questionbackgroundcolor|default('defaultbackgroundcolor'), aSurveyInfo.options.questionbackgroundcolorcustom|default(''), aSurveyInfo.options) }};
2026-06-17 10:06:07 +02:00
}
{# Row 186 / plan P4, revised row 196/197: the question help background is a
color chooser (questionhelpbackgroundcolor, default mode "color3" since row
196; a legacy stored hex passes through cm()) AND the help font color is a
chooser too (questionhelpfontcolor, 6-way + questionhelpfontcolorcustom,
default mode "default" = the default font color; legacy hex passes through
cm() as well). #}
2026-06-17 10:06:07 +02:00
.question-help-container, .question-valid-container {
background: {{ cmm.cm(aSurveyInfo.options.questionhelpbackgroundcolor|default('color3'), aSurveyInfo.options.questionhelpbackgroundcolorcustom|default('#fff3cd'), aSurveyInfo.options) }};
color: {{ cmm.cm(aSurveyInfo.options.questionhelpfontcolor|default('default'), aSurveyInfo.options.questionhelpfontcolorcustom|default('#444444'), aSurveyInfo.options) }};
2026-06-17 10:06:07 +02:00
}
.slider-handle {
background: {{ aSurveyInfo.options.sliderhandlecolor }};
}
.btn-primary {
background: {{ aSurveyInfo.options.primarycolor }};
}
.bg-primary{
background-color: {{ sQTitleBackgroundColor }};
color: {{ sQTitleTextColor }};
2026-06-17 10:06:07 +02:00
}
.btn-primary:hover, .btn-primary:focus {
background: {{ aSurveyInfo.options.primarycolor }};
}
.btn-check:active+.btn-primary,
.btn-check:checked+.btn-primary,
.btn-primary.active,
.btn-primary:active,
.show>.btn-primary.dropdown-toggle,
.show > .btn-primary.dropdown-toggle,
2026-06-17 10:06:07 +02:00
.btn-primary:focus {
background: {{ aSurveyInfo.options.primarycolor }};
}
{# Row 191 / row 178 plan P6: per-button colors for the navigator buttons
(classes respondage-btn-prev/-next/-submit from navigator.twig).
Backgrounds resolve via cmbg() (mode "default" = no rule = Bootstrap
default button background), text colors via cm() (mode "default" = the
default font color). Row-178 decision 7 defaults: Next/Submit background =
Color 1, text = Other ... #ffffff; Previous background = Other ... #ffffff,
text = Default font color. Legacy stored hex values pass through both
macros. The :hover/:focus/:active variants keep the same specificity as
Bootstrap's .btn-primary:hover rules above and win because this style
block is emitted later. #}
{% set sPrevBtnBg = cmm.cmbg(aSurveyInfo.options.previousbuttonbackgroundcolor|default('other'), aSurveyInfo.options.previousbuttonbackgroundcolorcustom|default('#ffffff'), aSurveyInfo.options) %}
{% set sPrevBtnColor = cmm.cm(aSurveyInfo.options.previousbuttontextcolor|default('default'), aSurveyInfo.options.previousbuttontextcolorcustom|default(''), aSurveyInfo.options) %}
{% set sNextBtnBg = cmm.cmbg(aSurveyInfo.options.nextbuttonbackgroundcolor|default('color1'), aSurveyInfo.options.nextbuttonbackgroundcolorcustom|default('#ffffff'), aSurveyInfo.options) %}
{% set sNextBtnColor = cmm.cm(aSurveyInfo.options.nextbuttontextcolor|default('other'), aSurveyInfo.options.nextbuttontextcolorcustom|default('#ffffff'), aSurveyInfo.options) %}
{% set sSubmitBtnBg = cmm.cmbg(aSurveyInfo.options.submitbuttonbackgroundcolor|default('color1'), aSurveyInfo.options.submitbuttonbackgroundcolorcustom|default('#ffffff'), aSurveyInfo.options) %}
{% set sSubmitBtnColor = cmm.cm(aSurveyInfo.options.submitbuttontextcolor|default('other'), aSurveyInfo.options.submitbuttontextcolorcustom|default('#ffffff'), aSurveyInfo.options) %}
{% if sPrevBtnBg != '' or sPrevBtnColor != '' %}
.respondage-btn-prev, .respondage-btn-prev:hover, .respondage-btn-prev:focus, .respondage-btn-prev:active {
{% if sPrevBtnBg != '' %}background: {{ sPrevBtnBg }}; border-color: {{ sPrevBtnBg }};{% endif %}
{% if sPrevBtnColor != '' %}color: {{ sPrevBtnColor }};{% endif %}
}
{% endif %}
{% if sNextBtnBg != '' or sNextBtnColor != '' %}
.respondage-btn-next, .respondage-btn-next:hover, .respondage-btn-next:focus, .respondage-btn-next:active {
{% if sNextBtnBg != '' %}background: {{ sNextBtnBg }}; border-color: {{ sNextBtnBg }};{% endif %}
{% if sNextBtnColor != '' %}color: {{ sNextBtnColor }};{% endif %}
}
{% endif %}
{% if sSubmitBtnBg != '' or sSubmitBtnColor != '' %}
.respondage-btn-submit, .respondage-btn-submit:hover, .respondage-btn-submit:focus, .respondage-btn-submit:active {
{% if sSubmitBtnBg != '' %}background: {{ sSubmitBtnBg }}; border-color: {{ sSubmitBtnBg }};{% endif %}
{% if sSubmitBtnColor != '' %}color: {{ sSubmitBtnColor }};{% endif %}
}
{% endif %}
2026-06-17 10:06:07 +02:00
{% set checkicon = '"\\' ~ aSurveyInfo.options.checkicon ~ '"' %}
.checkbox-item input[type="checkbox"]:checked + label::after, .checkbox-item input[type="radio"]:checked + label::after {
content: {{ checkicon }};
}
</style>