diff --git a/themes/survey/vanilla/views/layout_printanswers.twig b/themes/survey/vanilla/views/layout_printanswers.twig index d2a678d100c..a58d1ec0400 100644 --- a/themes/survey/vanilla/views/layout_printanswers.twig +++ b/themes/survey/vanilla/views/layout_printanswers.twig @@ -15,18 +15,30 @@ #} {% extends 'layout_global.twig' %} - -{% if aSurveyInfo.printPdf != 1 %} - {% block pjaxbegin %}
{% endblock %} -{% endif %} - +{% block ajaxindicator %}{% endblock %} +{% block pjaxbegin %}{% endblock %} {% block body %} - + {% block nav_bar %} + {% if (not aSurveyInfo.printPdf) %} + {{ parent() }} + {% endif %} + {% endblock %} {% block content %} {% set sViewContent = './subviews/content/' ~ aSurveyInfo.include_content ~ '.twig' %} {% include './subviews/content/outerframe.twig' with {'include_content': sViewContent } %} {% endblock %} - + {% if (not aSurveyInfo.printPdf) %} + {{ registerScript("BasicThemeScripts", " + if(window.basicThemeScripts === undefined){ + window.basicThemeScripts = new ThemeScripts(); + } + basicThemeScripts.initGlobal(); + ", "POS_END") }} + {% endif %} {% endblock %} - -{% block pjaxend %}
{% endblock %} +{% block footer %} + {% if (not aSurveyInfo.printPdf) %} + {{ parent() }} + {% endif %} +{% endblock %} +{% block pjaxend %}{% endblock %} diff --git a/themes/survey/vanilla/views/subviews/content/printanswers.twig b/themes/survey/vanilla/views/subviews/content/printanswers.twig index ef1e25773aa..f3777b30124 100644 --- a/themes/survey/vanilla/views/subviews/content/printanswers.twig +++ b/themes/survey/vanilla/views/subviews/content/printanswers.twig @@ -14,21 +14,7 @@ This file displays the page shown to user when a participant registers for taking a survey. NOTE: see layout_main.twig for more infos -#} - - -{# Call the global layout #} -{% extends "./layout_global.twig" %} - -{# Replace the content block #} -{% block body %} - - {% if (aSurveyInfo.printPdf != 1) %} - {% block nav_bar %} - {% endblock %} - {% endif %} - -
+#}
{% if (aSurveyInfo.printPdf != 1) %} {# This will display the script and the hidden inputs needed for Expression Manager #} {{ aSurveyInfo.EM.ScriptsAndHiddenInputs }} @@ -37,6 +23,4 @@ {{ include('./subviews/printanswers/printanswers_head.twig') }} {{ include('./subviews/printanswers/printanswers_table.twig') }} {{ include('./subviews/printanswers/printanswers_foot.twig') }} -
- -{% endblock %} +