[Koha-patches] [PATCH] MT3596 : Followup revert bug 3778 for patronsearch

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Thu May 27 22:13:24 CEST 2010


Previous commit introduced a selection by default of the library even in a network context.
Forcing the selections to be disabled by default and enabled only if selection desired
This patch fixes a problem when searching for patron in a network context.
I chose to implement the UI selection rather than getting the job done on GetBranchesLoop because I think it is the more sustainable soluction.

---
 .../prog/en/includes/patron-search.inc             |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
index 46a4edc..5a99e11 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
@@ -50,8 +50,8 @@ YAHOO.util.Event.onContentReady("header_search", function() {
 	<form action="/cgi-bin/koha/members/member.pl" method="post">
     <input id="searchmember" size="25" class="focus" name="member" type="text" value="<!--TMPL_VAR Name="member"-->"/>
 	<!--TMPL_IF Name="branchloop"-->
-	<span class="filteraction" id="filteraction_off"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[-]</a></span>
-	<span class="filteraction" id="filteraction_on"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[+]</a></span>
+	<span class="filteraction" id="filteraction_off"> <a href="#" onClick="$('#filters').toggle();$('.filteraction').toggle();$('#filters :input').attr('disabled','disabled');">[-]</a></span>
+	<span class="filteraction" id="filteraction_on"> <a href="#" onClick="$('#filters').toggle();$('.filteraction').toggle();$('#filters :input').removeAttr('disabled');">[+]</a></span>
 	<!--/TMPL_IF -->
     order by:
     <select name="orderby" id="searchorderby">
@@ -114,9 +114,10 @@ YAHOO.util.Event.onContentReady("header_search", function() {
 </div>
 <script type="text/javascript">//<![CDATA[
 $(document).ready(function() {
-	$("#filters").toggle();
-	$("#filteraction_off").toggle();
-});
+	$("#filters").toggle(); 
+	$('#filters :input').attr('disabled','disabled');
+    $("#filteraction_off").toggle(); 
+}); 
 //]]>
 </script>
 <!-- End Patrons Resident Search Box -->
-- 
1.7.0.4



More information about the Koha-patches mailing list