[Koha-patches] [PATCH] Bug 4389 - [3.2.x] Trigger quick slip print on empty checkout submit
Tomas Cohen Arazi
tomascohen at gmail.com
Mon Apr 18 15:26:12 CEST 2011
js listener approach. Added a reasonable id to the mainform.
To+
---
.../prog/en/modules/circ/circulation.tmpl | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index 02b5a2d..f75e30a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -40,6 +40,11 @@
}
} ).attr( 'checked', false );
<!-- /TMPL_IF -->
+ // listen submit to trigger qslip on empty checkout
+ $('#mainform').bind('submit',function() {
+ if ($('#barcode').val() == '') {
+ return printx_window('qslip'); }
+ });
var allcheckboxes = $(".checkboxed");
$("#renew_all").click(function(){
@@ -406,7 +411,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- /TMPL_IF -->
-<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
+<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform">
<fieldset id="circ_circulation_issue">
<!-- TMPL_IF NAME="DisplayClearScreenButton" -->
<input type="button" value="Clear Screen" onclick="window.location = '/cgi-bin/koha/circ/circulation.pl'" />
--
1.7.1
More information about the Koha-patches
mailing list