Username and library card fields for patron search
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Jan 2009 21:29:16 +0000 (21:29 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Jan 2009 21:29:16 +0000 (21:29 +0000)
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
Open-ILS/xul/staff_client/server/patron/search_form.js
Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul
Open-ILS/xul/staff_client/server/patron/search_result.js

index f8767ac..bfbc808 100644 (file)
 <!ENTITY common.true "True">
 <!ENTITY common.false "False">
 
+<!ENTITY common.textbox.cut "Cut">
+<!ENTITY common.textbox.copy "Copy">
+<!ENTITY common.textbox.paste "Paste">
+<!ENTITY common.textbox.delete "Delete">
+<!ENTITY common.textbox.select_all "Select All">
+
 <!ENTITY ilsevent.1000 "Login failed.  The username or password entered was incorrect.">
 <!ENTITY ilsevent.1001 "Login session has timed out or does not exist">
 <!ENTITY ilsevent.1002 "User was not found in the database">
 <!ENTITY staff.patron_search_form.first_given_name.label 'First Name:'>
 <!ENTITY staff.patron_search_form.ident.accesskey ''>
 <!ENTITY staff.patron_search_form.ident.label 'ID:'>
+<!ENTITY staff.patron_search_form.usrname.accesskey 'O'>
+<!ENTITY staff.patron_search_form.usrname.label 'OPAC Login:'>
+<!ENTITY staff.patron_search_form.card.accesskey 'B'>
+<!ENTITY staff.patron_search_form.card.label 'Barcode:'>
 <!ENTITY staff.patron_search_form.phone.accesskey 'P'>
 <!ENTITY staff.patron_search_form.phone.label 'Phone:'>
 <!ENTITY staff.patron_search_form.post_code.accesskey ''>
index f88dfda..7221129 100644 (file)
@@ -90,6 +90,32 @@ patron.search_form.prototype = {
                                                        };
                                                }
                                        ],
+                                       'usrname' : [
+                                               ['render'],
+                                               function(e) {
+                                                       return function() {
+                                                               if (params.query&&params.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&&params.query.card) {
+                                                                       e.setAttribute('value',params.query.card);
+                                                                       e.value = params.query.card;
+                                                               } else {
+                                                                       e.value = '';
+                                                               }
+                                                       };
+                                               }
+                                       ],
                                        'email' : [
                                                ['render'],
                                                function(e) {
index 0d29d2b..b2b820b 100644 (file)
                                accesskey="&staff.patron_search_form.ident.accesskey;"/>
                        <textbox id="ident" group="2" context="clipboard"/>
                </row>
+               <row id="psr6b">
+                       <label id="psl6b" control="usrname" 
+                               value="&staff.patron_search_form.usrname.label;" 
+                               accesskey="&staff.patron_search_form.usrname.accesskey;"/>
+                       <textbox id="usrname" group="0" context="clipboard"/>
+               </row>
+               <row id="psr6c">
+                       <label id="psl6c" control="card" 
+                               value="&staff.patron_search_form.card.label;" 
+                               accesskey="&staff.patron_search_form.card.accesskey;"/>
+                       <textbox id="card" group="0" context="clipboard"/>
+               </row>
                <row id="psr6a">
                        <label id="psl6a" value=" "/>
                </row>
index 4ce743d..6b4eb74 100644 (file)
@@ -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];