diff --git a/views/layout_survey_list.twig b/views/layout_survey_list.twig index 4a2e067..4c8c4da 100644 --- a/views/layout_survey_list.twig +++ b/views/layout_survey_list.twig @@ -92,7 +92,7 @@ NOTE: Feel free to ask for functions, variables, etc, that you feel are missing {{ include('./subviews/header/head.twig') }} + class=" {{ aSurveyInfo.class.body }} font-{{ aSurveyInfo.options.font }} lang-{{ aSurveyInfo.languagecode }} {{ aSurveyInfo.surveyformat }} {% if( aSurveyInfo.options.brandlogofile|default('off') not in ['off', '', 'inherit'] and aSurveyInfo.options.brandlogo|default('on') != 'off') %}brand-logo{% endif %}" {{ aSurveyInfo.attr.body }} > {# This used for the pjax system #}
diff --git a/views/subviews/header/custom_header.twig b/views/subviews/header/custom_header.twig index 4843cb7..3251192 100644 --- a/views/subviews/header/custom_header.twig +++ b/views/subviews/header/custom_header.twig @@ -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; } diff --git a/views/subviews/header/nav_bar.twig b/views/subviews/header/nav_bar.twig index 773b9d0..65bd351 100644 --- a/views/subviews/header/nav_bar.twig +++ b/views/subviews/header/nav_bar.twig @@ -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-). Applied on #survey-nav,