Bug fixing batchmod.pl
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 28 Aug 2009 21:47:40 +0000 (23:47 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 30 Sep 2009 09:30:10 +0000 (11:30 +0200)
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tmpl
tools/batchMod.pl

index 138b81e..eec0e90 100644 (file)
@@ -90,7 +90,7 @@
                                             <select name="<!-- TMPL_VAR name="authcode" -->" id="<!-- TMPL_VAR name="authcode" -->">
                                                 <option selected="selected" value="0">No change</option>
                                                 <!-- TMPL_LOOP name="values" -->
-                                                    <option value="<!-- TMPL_VAR name="id" -->"><!-- TMPL_VAR NAME="lib" --></option>
+                                                    <option value="<!-- TMPL_VAR name="authorised_value" -->"><!-- TMPL_VAR NAME="lib" --></option>
                                                 <!-- /TMPL_LOOP -->
                                             </select>
                                         </li>
                                         </li>
                                     <!-- /TMPL_IF -->
                                     <li>
-                                        <label for="itemnote">Change item note</label>
-                                        <textarea name="itemnote" id="itemnote" rows="10" cols="40" ></textarea>
+                                        <label for="itemnotes">Change item note</label>
+                                        <textarea name="itemnotes" id="itemnotes" rows="10" cols="40" ></textarea>
                                     </li>
                                 </ol>
                             </fieldset>
index dd3c6af..a9cbf3a 100755 (executable)
@@ -55,7 +55,7 @@ my $authvals = [['items.notforloan', 'Item not for loan', 'notforloan'],
                              ['items.wthdrawn', 'item withdrawn', 'sele'],
                              ['items.damaged', 'item damaged', 'damaged'],
                              ['items.location', 'item location', 'location'],
-                             ['items.ccode', 'items.ccode FIXME???', 'ccode'],
+                             ['items.ccode', 'items.ccode', 'ccode'],
                             ];
 
 my $itemlevelpref = C4::Context->preference('item-level_itypes');
@@ -163,7 +163,7 @@ if ( $invars->{op} && $invars->{op} eq 'barcodes'){
                        for my $auth (@$authvals){
                                my ($authfieldname, $description, $hashfdname) = @$auth;
                                my $authcode = GetAuthValCode($authfieldname);
-                               if ($invars->{$authcode} && $invars->{$authcode} ne '0'){
+                               if ($authcode && $invars->{$authcode} && $invars->{$authcode} ne '0'){
                                        $item->{$hashfdname}=$invars->{$authcode};
                                }
                        }