From 41def6af1dc574cee0b88ce99a2af1d983809b1c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 23 May 2014 14:46:54 +0000 Subject: [PATCH] Bug 11365: (follow-up) trim whitespace in the translate_card_element block Trim leading and trailing whitespace in the text generated by the translate_card_element block to avoid generating unescaped multi-line strings, which breaks the JavaScript To test: [1] Test actions in the patron card creator that generate JavaScript alerts, such as hitting the delete button without first selecting a batch or profile. Signed-off-by: Galen Charlton --- .../prog/en/modules/patroncards/manage.tt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt index 3e04ee3147..1daf3bd511 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ -1,14 +1,14 @@ [% BLOCK translate_card_element %] -[% SWITCH element %] -[% CASE 'layout' %]layout -[% CASE 'Layouts' %]Layouts -[% CASE 'template' %]template -[% CASE 'Templates' %]Templates -[% CASE 'profile' %]profile -[% CASE 'Profiles' %]Profiles -[% CASE 'batch' %]batch -[% CASE 'Batches' %]Batches -[% END %] +[%- SWITCH element -%] +[%- CASE 'layout' -%]layout +[%- CASE 'Layouts' -%]Layouts +[%- CASE 'template' -%]template +[%- CASE 'Templates' -%]Templates +[%- CASE 'profile' -%]profile +[%- CASE 'Profiles' -%]Profiles +[%- CASE 'batch' -%]batch +[%- CASE 'Batches' -%]Batches +[%- END -%] [% END %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Patron cards › Manage patron card elements -- 2.39.5