From 45e39882432dd9fdae0fc1b1ef7b7b8b09a9480a 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 (cherry picked from commit fc640d2a86f395ad392f84314bce22e8b4dab1fe) Signed-off-by: Julian Maurice --- .../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 c21aef5eaf..f4fa138b82 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 b45f27b12f..7d86d61a0e 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 4db0d1a2e2..fdb1d7290b 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 %]