From 811c4e8402593127074ad47a81098f3aad389c94 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 1 Dec 2015 12:56:56 +0000 Subject: [PATCH] Bug 13618: Fix for edit biblios and items On editing biblios or items, the marc_lib, marc_value and javascript values are often populated with html code which needs to be displayed raw. Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- .../prog/en/modules/acqui/addorderiso2709.tt | 4 ++-- .../en/modules/authorities/authorities.tt | 8 ++++---- .../prog/en/modules/cataloguing/addbiblio.tt | 8 ++++---- .../prog/en/modules/cataloguing/additem.tt | 6 +++--- .../prog/en/modules/serials/serials-edit.tt | 12 +++++------ .../en/modules/services/itemrecorddisplay.tt | 6 +++--- .../prog/en/modules/tools/batchMod-edit.tt | 4 ++-- .../bootstrap/en/modules/opac-MARCdetail.tt | 20 +++++++++---------- .../en/modules/opac-auth-MARCdetail.tt | 2 +- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 31822d98a3..7a3e291306 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -308,9 +308,9 @@ [% FOREACH iteminformatio IN item.iteminformation %]
  • [% IF (iteminformatio.mandatory) %] - + [% ELSE %] - + [% END %] [% IF ( iteminformatio.marc_value.type == 'select' ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index 7faf688d88..92cceed133 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -63,7 +63,7 @@ function AreMandatoriesNotOk(){ [% FOREACH subfield_loo IN innerloo.subfield_loop %] [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]"); tab.push("[% BIG_LOO.number %]"); - label.push("[% subfield_loo.marc_lib |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"); + label.push("[% subfield_loo.marc_lib.raw |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"); [% END %] [% END %] [% END %] @@ -319,7 +319,7 @@ function confirmnotdup(redirect){ Move Up [% END %] [% ELSE %][% END %] - [% subfield_loo.marc_lib %] + [% subfield_loo.marc_lib.raw %] [% IF ( subfield_loo.mandatory ) %]*[% END %] @@ -363,7 +363,7 @@ function confirmnotdup(redirect){ [% ELSE %] ... [% END %] - [% mv.javascript %] + [% mv.javascript.raw %] [% ELSIF ( mv.type == 'text' ) %] [% ELSIF ( mv.type == 'textarea' ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index a29c12ce64..4e0ac0cf1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -253,7 +253,7 @@ function AreMandatoriesNotOk(){ [% FOREACH subfield_loo IN innerloo.subfield_loop %] [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]"); tab.push("[% BIG_LOO.number %]"); - label.push("[% subfield_loo.marc_lib %]"); + label.push("[% subfield_loo.marc_lib.raw %]"); [% END %] [% END %] [% END %] @@ -619,7 +619,7 @@ function Changefwk(FwkList) { Move Up [% END %] [% ELSE %][% END %] - [% subfield_loo.marc_lib %] + [% subfield_loo.marc_lib.raw %] [% IF ( subfield_loo.mandatory ) %]*[% END %] @@ -656,7 +656,7 @@ function Changefwk(FwkList) { Tag editor [% END %] - [% mv.javascript %] + [% mv.javascript.raw %] [% ELSIF ( mv.type == 'hidden' ) %] [% ELSIF ( mv.type == 'textarea' ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index d7c191359e..01137e17cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -225,9 +225,9 @@ function confirm_deletion() { [% FOREACH ite IN item %]
  • [% IF ( ite.mandatory ) %] - + [% ELSE %] - + [% END %] [% SET mv = ite.marc_value %] @@ -258,7 +258,7 @@ function confirm_deletion() { [% ELSE %] ... [% END %] - [%- mv.javascript -%] + [%- mv.javascript.raw -%] [% ELSIF ( mv.type == 'text' ) %] [% ELSIF ( mv.type == 'textarea' ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 8a4081a973..d4a7708d91 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -233,9 +233,9 @@ $(document).ready(function() {
      [% FOREACH iteminformatio IN item.iteminformation %]
    1. [% IF (iteminformatio.mandatory) %] - + [% ELSE %] - + [% END %] [% IF ( iteminformatio.marc_value.type == 'select' ) %] [% ELSE %] - [% iteminformatio.marc_value %] + [% iteminformatio.marc_value.raw %] [% END %] @@ -379,9 +379,9 @@ $(document).ready(function() {
        [% FOREACH iteminformatio IN newserialloo.iteminformation %]
      1. [% IF (iteminformatio.mandatory) %] - + [% ELSE %] - + [% END %] [% IF ( iteminformatio.marc_value.type == 'select' ) %] [% ELSE %] - [% iteminformatio.marc_value %] + [% iteminformatio.marc_value.raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt index d55268a4db..d738b06233 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt @@ -7,9 +7,9 @@ [% END %]
        [% IF (iteminfo.mandatory) %] - + [% ELSE %] - + [% END %] [% IF ( iteminfo.marc_value.type == 'select' ) %] [% ELSE %] - [% iteminfo.marc_value %] + [% iteminfo.marc_value.raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index 921760355a..329107a3b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -174,7 +174,7 @@ $(document).ready(function(){ [% UNLESS ( ite.mandatory ) %][% ELSE %]Required[% END %] @@ -199,7 +199,7 @@ $(document).ready(function(){ [% ELSE %] ... [% END %] - [% mv.javascript %] + [% mv.javascript.raw %] [% ELSIF ( mv.type == 'text' ) %] [% ELSIF ( mv.type == 'hidden' ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt index f4ca0951f2..a34310df72 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt @@ -37,7 +37,7 @@ [% tab0X.tag %] [% FOREACH subfiel IN tab0X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -46,7 +46,7 @@ [% tab1X.tag %] [% FOREACH subfiel IN tab1X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -56,7 +56,7 @@ [% tab2X.tag %] [% FOREACH subfiel IN tab2X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -66,7 +66,7 @@ [% tab3X.tag %] [% FOREACH subfiel IN tab3X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -76,7 +76,7 @@ [% tab4X.tag %] [% FOREACH subfiel IN tab4X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -86,7 +86,7 @@ [% tab5X.tag %] [% FOREACH subfiel IN tab5X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -96,7 +96,7 @@ [% tab6X.tag %] [% FOREACH subfiel IN tab6X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -106,7 +106,7 @@ [% tab7X.tag %] [% FOREACH subfiel IN tab7X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -116,7 +116,7 @@ [% tab8X.tag %] [% FOREACH subfiel IN tab8X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] @@ -126,7 +126,7 @@ [% tab9X.tag %] [% FOREACH subfiel IN tab9X.subfield %] - [% subfiel.marc_lib %] + [% subfiel.marc_lib.raw %] [% subfiel.marc_value %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt index 7aded0b992..6de7978cd2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt @@ -49,7 +49,7 @@

        [% Tag0X.tag %]

          [% FOREACH subfiel IN Tag0X.subfield %] -
        • [% subfiel.marc_lib %]: +
        • [% subfiel.marc_lib.raw %]: [% IF subfiel.isurl %][% subfiel.marc_value %] [% ELSE %][% subfiel.marc_value %][% END %]
        • [% END %] -- 2.39.5