[Koha-patches] [PATCH] [SIGNED-OFF] Fix for 4832 - Re-editing a suggestion changes the item type

Katrin Fischer katrin.fischer at bsz-bw.de
Mon Dec 6 16:41:17 CET 2010


From: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer at bsz-bw.de>
---
 .../prog/en/modules/suggestion/suggestion.tmpl     |    2 +-
 suggestion/suggestion.pl                           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
index 7489cb6..6696b92 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
@@ -110,7 +110,7 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di
         <li><label for="itemtype">Document Type:</label>
             <select id="itemtype" name="itemtype" >
             <!--TMPL_LOOP Name="itemtypeloop"-->
-                <!--TMPL_IF Name="selected"--><option selected="selected" value="<!--TMPL_VAR Name="code" -->"><!--TMPL_ELSE--><option value="<!--TMPL_VAR Name="code" -->"><!--/TMPL_IF-->
+                <!--TMPL_IF Name="selected"--><option selected="selected" value="<!--TMPL_VAR Name="itemtype" -->"><!--TMPL_ELSE--><option value="<!--TMPL_VAR Name="itemtype" -->"><!--/TMPL_IF-->
                 <!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
                 <!--TMPL_VAR Name="description" --></option>
             <!--/TMPL_LOOP-->
diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl
index 57a1ba7..8ca17d0 100755
--- a/suggestion/suggestion.pl
+++ b/suggestion/suggestion.pl
@@ -249,7 +249,7 @@ $template->param( branchloop => \@branchloop,
 # the index parameter is different for item-level itemtypes
 my $supportlist=GetSupportList();				
 foreach my $support(@$supportlist){
-    $$support{'selected'}= $$support{'code'} eq $$suggestion_ref{'itemtype'};
+    $$support{'selected'}= $$support{'itemtype'} eq $$suggestion_ref{'itemtype'};
     if ($$support{'imageurl'}){
         $$support{'imageurl'}= getitemtypeimagelocation( 'intranet', $$support{'imageurl'} );
     }
-- 
1.6.3.3




More information about the Koha-patches mailing list