[Koha-patches] [PATCH] Change to reserve process: hide the item list by default, only show if the user chooses 'Place hold on specific item.'

Owen Leonard oleonard at myacpl.org
Mon Oct 20 17:43:08 CEST 2008


---
 .../opac-tmpl/prog/en/modules/opac-reserve.tmpl    |   30 ++++++++++++++++---
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
index 08d0aa3..9083c8e 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
@@ -23,6 +23,18 @@
 			$("#requestany").attr("checked","checked");
 		}
 	});
+	 <!-- TMPL_IF NAME="OPACItemHolds" -->$("#requestspecific").hide();
+	$("input[@value='Place Hold']:first").hide();
+	$("#requestone").click(function(){
+		if(this.checked){
+			$("#requestspecific").show();
+			$("#requestany").attr("value","");
+		} else {
+			$("#requestspecific").hide();
+			$("#requestany").attr("value","Any");
+			$("input[@name='checkitem']").attr("checked","");
+		}
+	});<!-- /TMPl_IF -->
  });
 // ]]>
 </script>
@@ -126,11 +138,19 @@
             </li>
             <!-- /TMPL_UNLESS -->
 			
-			<!-- TMPL_IF NAME="forloan" -->
-            <!-- TMPL_IF NAME="OPACItemHolds" --><li> <label for="requestany">Place a hold on the next available copy </label>
-            <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
-            </li><!-- TMPL_ELSE --><input type="hidden" name="request" value="Any" /><!-- /TMPL_IF -->
-			</ol>
+		<!-- TMPL_IF NAME="forloan" -->
+
+        <!-- TMPL_IF NAME="OPACItemHolds" -->
+		<li><label for="requestone">Place a hold on a specific copy:</label>
+		
+		<input type="hidden" id="requestany" name="request" value="Any" />
+        <input type="checkbox" id="requestone" name="requestone" value="requestone" />
+        </li>
+		<!-- TMPL_ELSE -->
+		<input type="hidden" name="request" value="Any" />
+		<!-- /TMPL_IF -->
+
+		</ol>
 		</fieldset>
 
 
-- 
1.5.5.GIT




More information about the Koha-patches mailing list