From e8a8a2e2a7e20261895dd6a6ea9c513f2d5567fb Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 12 Jan 2009 21:29:16 +0000 Subject: [PATCH] Username and library card fields for patron search git-svn-id: svn://svn.open-ils.org/ILS/trunk@11807 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 10 +++++++++ .../xul/staff_client/server/patron/search_form.js | 26 ++++++++++++++++++++++ .../server/patron/search_form_overlay.xul | 12 ++++++++++ .../staff_client/server/patron/search_result.js | 9 +++++++- 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index f8767ac303..bfbc8082af 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -52,6 +52,12 @@ + + + + + + @@ -1196,6 +1202,10 @@ + + + + diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.js b/Open-ILS/xul/staff_client/server/patron/search_form.js index f88dfdaea3..72211296b7 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form.js +++ b/Open-ILS/xul/staff_client/server/patron/search_form.js @@ -90,6 +90,32 @@ patron.search_form.prototype = { }; } ], + 'usrname' : [ + ['render'], + function(e) { + return function() { + if (params.query&¶ms.query.usrname) { + e.setAttribute('value',params.query.usrname); + e.value = params.query.usrname; + } else { + e.value = ''; + } + }; + } + ], + 'card' : [ + ['render'], + function(e) { + return function() { + if (params.query&¶ms.query.card) { + e.setAttribute('value',params.query.card); + e.value = params.query.card; + } else { + e.value = ''; + } + }; + } + ], 'email' : [ ['render'], function(e) { diff --git a/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul b/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul index 0d29d2b0fc..b2b820b4bf 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul @@ -80,6 +80,18 @@ accesskey="&staff.patron_search_form.ident.accesskey;"/> + + + + diff --git a/Open-ILS/xul/staff_client/server/patron/search_result.js b/Open-ILS/xul/staff_client/server/patron/search_result.js index 4ce743dc43..6b4eb74e74 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_result.js +++ b/Open-ILS/xul/staff_client/server/patron/search_result.js @@ -140,6 +140,13 @@ patron.search_result.prototype = { var search_depth = 0; for (var i in query) { switch( i ) { + case 'card': + search_hash[ i ] = {}; + search_hash[ i ].value = query[i]; + search_hash[i].group = 3; + obj.search_term_count++; + break; + case 'phone': case 'ident': search_hash[ i ] = {}; @@ -156,7 +163,7 @@ patron.search_result.prototype = { obj.search_term_count++; break; - case 'family_name': case 'first_given_name': case 'second_given_name': case 'email': case 'alias': + case 'family_name': case 'first_given_name': case 'second_given_name': case 'email': case 'alias': case 'usrname': search_hash[ i ] = {}; search_hash[ i ].value = query[i]; -- 2.11.0