[Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6458 - incorrect parsing result in translation processing

Katrin Fischer Katrin.Fischer.83 at web.de
Fri Sep 2 08:11:30 CEST 2011


From: Owen Leonard <oleonard at myacpl.org>

Fixing improperly nested template logic inside HTML tags in MARC
editor. Modifying script to stop tag attribute markup from being
passed to the template directly in favor of using template logic.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
I fixed the conflict with previous patch for addbiblio.tt.
---
 cataloguing/addbiblio.pl                           |    2 +-
 .../prog/en/modules/cataloguing/addbiblio.tt       |   15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl
index 637d82d..21601e9 100755
--- a/cataloguing/addbiblio.pl
+++ b/cataloguing/addbiblio.pl
@@ -874,7 +874,7 @@ foreach my $thisframeworkcode ( keys %$frameworks ) {
 		frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
 	);
 	if ($frameworkcode eq $thisframeworkcode){
-		$row{'selected'}="selected=\"selected\"";
+		$row{'selected'} = 1;
 		}
 	push @frameworkcodeloop, \%row;
 } 
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 84c85d1..0d974a6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
@@ -778,8 +778,12 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
 			<li id="changeframework"><label for="Frameworks">Change framework: </label>
 			<select name="Frameworks" id="Frameworks" onchange="Changefwk(this);">
 			                <option value="Default">Default</option>
-							[% FOREACH frameworkcodeloo IN frameworkcodeloop %]                                             
-                                <option value="[% frameworkcodeloo.value %]" [% frameworkcodeloo.selected %]>
+							[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
+                                [% IF ( frameworkcodeloo.selected ) %]
+                                    <option value="[% frameworkcodeloo.value %]" selected="selected">
+                                [% ELSE %]
+                                    <option value="[% frameworkcodeloo.value %]">
+                                [% END %]
 					             [% frameworkcodeloo.frameworktext %]                                      
                                  </option>                          
 					        [% END %]
@@ -857,8 +861,11 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
             <div class="subfield_line" style="[% subfield_loo.visibility %]; float: left; clear: left; width: 100%;" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]">
             
                 [% UNLESS ( subfield_loo.advancedMARCEditor ) %]
-                    [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield">
-                    [% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">[% END %]
+                [% IF ( subfield_loo.fixedfield ) %]
+                    <label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;"  class="labelsubfield">
+                [% ELSE %]
+                    <label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">
+                [% END %]
                 [% END %] 
                 
                 [% UNLESS ( subfield_loo.hide_marc ) %]
-- 
1.7.4.1



More information about the Koha-patches mailing list