(MT #3076) make cancel button working on return
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Thu, 4 Mar 2010 09:15:00 +0000 (10:15 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 8 Mar 2010 22:07:30 +0000 (23:07 +0100)
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
circ/returns.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl

index 5a5b4a3..63d2c46 100755 (executable)
@@ -175,7 +175,7 @@ if ($dotransfer){
 }
 
 # actually return book and prepare item table.....
-if ($barcode) {
+if ($barcode and not $query->param('cancel')) {
     $barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter');
     $itemnumber = GetItemnumberFromBarcode($barcode);
 
index 2368cd7..d33f582 100644 (file)
@@ -57,7 +57,15 @@ function Dopop(link) {
 
 <div class="yui-g">
 <!-- TMPL_IF NAME="wrongbranch" -->
-<div class="dialog alert"><h3>Cannot Check In</h3><p>This item must be checked in at its home library. <strong>NOT CHECKED IN</strong></p>
+<div class="dialog alert"><h3>Cannot Check In</h3><p>This item must be checked in at its home library: <!-- TMPL_VAR Name="homebranch" -->. <strong>NOT CHECKED IN</strong></p>
+            <form method="post" action="returns.pl" class="confirm">
+                               
+                <input type="hidden" name="barcode" value="<!-- TMPL_VAR Name="barcode" -->" />
+                <input type="hidden" name="exemptfine" value="<!-- TMPL_VAR Name="exemptfine" -->" />
+                <input type="hidden" name="dropboxmode" value="<!-- TMPL_VAR Name="dropboxmode" -->" />
+                               <input type="submit" name="override" value="Check-In" class="submit" />
+                               <input type="submit" name="cancel" value="Cancel" class="submit" />
+               </form>
 </div>
 <!-- /TMPL_IF -->
 <!-- case of a mistake in transfer loop -->