[Koha-patches] [PATCH] Disable Barcode Field If Item Needs Action
Kyle M Hall
kyle.m.hall at gmail.com
Tue May 4 18:27:00 CEST 2010
This patch disabled the barcode field for returns
until the hold/transfer question is answered.
For Error Messages, a "Continue" button has been added
that re-enables the barcode field.
---
.../prog/en/modules/circ/returns.tmpl | 33 +++++++++++++++-----
1 files changed, 25 insertions(+), 8 deletions(-)
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 71934c9..a79763a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl
@@ -40,6 +40,15 @@ function Dopop(link) {
});
//]]>
</script>
+
+<script>
+function continueReturns() {
+ document.getElementById("barcode_submit").disabled = false;
+ document.getElementById("barcode").disabled = false;
+ document.getElementById("barcode").focus();
+ document.getElementById("continue_submit").style.display = 'none';
+}
+</script
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
@@ -288,6 +297,8 @@ function Dopop(link) {
<p class="problem">Item is withdrawn.</p>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
+
+ <input id="continue_submit" type="submit" value="Continue" onclick="continueReturns();" />
<!-- TMPL_IF NAME="soundon" -->
<audio src="/intranet-tmpl/prog/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
<!-- /TMPL_IF -->
@@ -312,14 +323,20 @@ function Dopop(link) {
<fieldset>
<legend>Check In</legend>
<label for="barcode">Enter item barcode: </label>
- <!-- TMPL_IF NAME="exemptfine" -->
- <input name="barcode" id="barcode" size="14" class="focus alert"/>
- <!-- TMPL_ELSIF NAME="dropboxmode"-->
- <input name="barcode" id="barcode" size="14" class="focus alert"/>
- <!-- TMPL_ELSE -->
- <input name="barcode" id="barcode" size="14" class="focus"/>
- <!-- /TMPL_IF -->
- <input type="submit" class="submit" value="Submit" />
+ <input name="barcode" id="barcode" size="14"
+ class="focus <!-- TMPL_IF NAME="exemptfine" -->alert<!-- TMPL_ELSIF NAME="dropboxmode"-->alert<!-- /TMPL_IF -->"
+ <!-- TMPL_IF NAME="found" --> disabled
+ <!-- TMPL_ELSIF NAME="WrongTransfer" --> disabled
+ <!-- TMPL_ELSIF NAME="errmsgloop" --> disabled
+ <!-- /TMPL_IF -->
+ />
+ <input id="barcode_submit" type="submit" class="submit" value="Submit"
+ <!-- TMPL_IF NAME="found" --> disabled
+ <!-- TMPL_ELSIF NAME="WrongTransfer" --> disabled
+ <!-- TMPL_ELSIF NAME="errmsgloop" --> disabled
+ <!-- /TMPL_IF -->
+ />
+
<!-- TMPL_LOOP Name="inputloop" -->
<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
--
1.5.6.5
More information about the Koha-patches
mailing list