Skip to content

Commit

Permalink
Fixed issue #14352: Multiple HTML open in printanswers view
Browse files Browse the repository at this point in the history
Dev: extend 2 times layout_global
  • Loading branch information
Shnoulle committed Dec 17, 2018
1 parent 188934c commit a1b2972
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
30 changes: 21 additions & 9 deletions themes/survey/vanilla/views/layout_printanswers.twig
Expand Up @@ -15,18 +15,30 @@
#}
{% extends 'layout_global.twig' %}

{% if aSurveyInfo.printPdf != 1 %}
{% block pjaxbegin %}<div></div>{% 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 %}<div></div>{% endblock %}
{% block footer %}
{% if (not aSurveyInfo.printPdf) %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block pjaxend %}{% endblock %}
20 changes: 2 additions & 18 deletions themes/survey/vanilla/views/subviews/content/printanswers.twig
Expand Up @@ -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 %}

<section>
#}<section>
{% if (aSurveyInfo.printPdf != 1) %}
{# This will display the script and the hidden inputs needed for Expression Manager #}
{{ aSurveyInfo.EM.ScriptsAndHiddenInputs }}
Expand All @@ -37,6 +23,4 @@
{{ include('./subviews/printanswers/printanswers_head.twig') }}
{{ include('./subviews/printanswers/printanswers_table.twig') }}
{{ include('./subviews/printanswers/printanswers_foot.twig') }}
</section>

{% endblock %}
</section>

0 comments on commit a1b2972

Please sign in to comment.