From 25e61bc1fdda3304e1fb1b4929633fdb3539a7a4 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 --- .../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 +++++++++++--------- .../opac-tmpl/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 7bf6a4f..93baebe 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 2d6e5b4..d6bbf45 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 af60eab..0f517d9 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 c389c79..85a0191 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 %]