[Koha-patches] [PATCH 6/6] (MT #3076) make cancel button working on return

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Mon Mar 8 23:11:24 CET 2010


From: Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com>

---
 circ/returns.pl                                    |    2 +-
 .../prog/en/modules/circ/returns.tmpl              |   10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/circ/returns.pl b/circ/returns.pl
index adec8f6..f505717 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -183,7 +183,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);
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
index fef7c57..f26f27e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
@@ -59,7 +59,15 @@ function Dopop(link) {
 <!-- /TMPL_IF -->
 
 <!-- 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 -->
-- 
1.6.3.3




More information about the Koha-patches mailing list