fix(views): legacy guard for pre-Prompt-M DB rows without theme reset
A DB row from before Prompt M still carries the old on/off keys
(brandlogo/centerlogo/rightlogo). When the theme files are updated WITHOUT
a theme reset, such a row (e.g. centerlogo=off with a non-empty old
centerlogofile) would show that logo under the new file-only logic. The
views now also honor the legacy key when present: <pos>logo == 'off' keeps
the logo hidden (|default('on') after a reset, where the key is gone).
Fresh installs are unaffected: all new keys have config.xml defaults and
the views fall back via |default when keys are absent.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
c182259b7c
commit
cea02487c7
2 changed files with 10 additions and 5 deletions
|
|
@ -65,7 +65,7 @@
|
|||
background-color: {{ aSurveyInfo.options.privacybackgroundcolor }};
|
||||
}
|
||||
|
||||
{% if ( aSurveyInfo.options.brandlogofile|default('off') not in ['off', '', 'inherit'] ) %}
|
||||
{% if ( aSurveyInfo.options.brandlogofile|default('off') not in ['off', '', 'inherit'] and aSurveyInfo.options.brandlogo|default('on') != 'off' ) %}
|
||||
body .top-container {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,9 +54,14 @@ For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig
|
|||
{% set brandLogoFile = aSurveyInfo.options.brandlogofile|default('off') %}
|
||||
{% set centerLogoFile = aSurveyInfo.options.centerlogofile|default('off') %}
|
||||
{% set rightLogoFile = aSurveyInfo.options.rightlogofile|default('off') %}
|
||||
{% set showBrandLogo = (brandLogoFile not in ['off', '', 'inherit'] and imageSrc(brandLogoFile)) %}
|
||||
{% set showCenterLogo = (centerLogoFile not in ['off', '', 'inherit'] and imageSrc(centerLogoFile)) %}
|
||||
{% set showRightLogo = (rightLogoFile not in ['off', '', 'inherit'] and imageSrc(rightLogoFile)) %}
|
||||
{# Legacy guard: a DB row from BEFORE Prompt M (theme files updated WITHOUT a
|
||||
theme reset) still carries the old on/off keys. If such a row has e.g.
|
||||
centerlogo="off" while its old centerlogofile still holds a path, the logo
|
||||
must stay hidden. After a theme reset the old keys are gone from the row
|
||||
and |default('on') lets the logo show again. #}
|
||||
{% set showBrandLogo = (brandLogoFile not in ['off', '', 'inherit'] and aSurveyInfo.options.brandlogo|default('on') != 'off' and imageSrc(brandLogoFile)) %}
|
||||
{% set showCenterLogo = (centerLogoFile not in ['off', '', 'inherit'] and aSurveyInfo.options.centerlogo|default('on') != 'off' and imageSrc(centerLogoFile)) %}
|
||||
{% set showRightLogo = (rightLogoFile not in ['off', '', 'inherit'] and aSurveyInfo.options.rightlogo|default('on') != 'off' and imageSrc(rightLogoFile)) %}
|
||||
{# THEME ADDITION: font for the header / top menu (config.xml option "headerfont",
|
||||
type fontselect). "base" = same as the base font: no extra class, the navbar
|
||||
inherits the body font (body gets font-<base font>). Applied on #survey-nav,
|
||||
|
|
|
|||
Loading…
Reference in a new issue