Fix for 4832 - Re-editing a suggestion changes the item type
authorOwen Leonard <oleonard@myacpl.org>
Mon, 6 Dec 2010 15:41:17 +0000 (16:41 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Sat, 11 Dec 2010 19:00:44 +0000 (08:00 +1300)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
suggestion/suggestion.pl

index 7489cb6..6696b92 100644 (file)
@@ -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-->
index 57a1ba7..8ca17d0 100755 (executable)
@@ -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'} );
     }