From fc640d2a86f395ad392f84314bce22e8b4dab1fe Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 22 Feb 2016 09:24:29 +0000 Subject: [PATCH] Bug 15111: Do not include the antiClickjack legacy browser trick for greybox Most of the scripts called via greybox (which uses iframe) don't include doc-head-close. But some do. This patch adds a popup parameter for these templates, not to include the legacy browser trick and avoid the replacement of the location. Test plan: 1/ Export patroncard and label 2/ translate itemtypes 3/ click on a idref link at the OPAC Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack Signed-off-by: Kyle M Hall --- .../prog/en/includes/doc-head-close.inc | 20 ++++++++++--------- .../prog/en/modules/admin/localization.tt | 2 +- .../prog/en/modules/labels/label-print.tt | 2 +- .../prog/en/modules/patroncards/print.tt | 2 +- .../bootstrap/en/includes/doc-head-close.inc | 20 ++++++++++--------- .../bootstrap/en/modules/opac-idref.tt | 2 +- 6 files changed, 26 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index ec26a85712..90e4d4783e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -4,15 +4,17 @@ [%# Prevent XFS attacks -%] - - +[% UNLESS popup %] + + +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt index 2d6e5b40b3..d6bbf458f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt @@ -1,6 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Localization -[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'doc-head-close.inc' popup => 1 %] [% INCLUDE 'greybox.inc' %] [% INCLUDE 'datatables.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt index af60eabe9e..0f517d980b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt @@ -1,6 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Label creator › Label printing/exporting - [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'doc-head-close.inc' popup => 1 %] +[% UNLESS popup %] + + +[% END %] [% IF ( bidi ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt index c389c79d3d..85a01917e4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt @@ -1,7 +1,7 @@ [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your search IDREF for ppn [% unimarc3 %] -[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'doc-head-close.inc' popup => 1 %] [% BLOCK cssinclude %]