my $iv = _clean_regex_chars($$search{ident}{value});
my $nv = _clean_regex_chars($$search{name}{value});
my $cv = _clean_regex_chars($$search{card}{value});
+ my $egv = _clean_regex_chars($$search{egid}{value});
my $card = '';
if ($cv) {
unshift(@usrv, $cv);
}
+ # for Evergreen usr id search
+ my $egid = '';
+ $_ = $egv;
+ if (m/\D/) {
+ $egid = ' AND FALSE';
+ } elsif ($egv) {
+ $egid = ' AND users.id = ' . $egv;
+ }
+
my $phone = '';
my @ps;
my @phonev;
WHERE users.deleted = FALSE
$inactive
$opt_in_where
+ $egid
GROUP BY $group_list
ORDER BY $order_by
LIMIT $limit
<!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.egid.accesskey 'E'>
+<!ENTITY staff.patron_search_form.egid.label 'Evergreen User ID:'>
<!ENTITY staff.patron_search_form.phone.accesskey 'P'>
<!ENTITY staff.patron_search_form.phone.label 'Phone:'>
<!ENTITY staff.patron_search_form.post_code.accesskey ''>
};
}
],
+ 'egid' : [
+ ['render'],
+ function(e) {
+ return function() {
+ if (params.query&¶ms.query.egid) {
+ e.setAttribute('value',params.query.egid);
+ e.value = params.query.egid;
+ } else {
+ e.value = '';
+ }
+ };
+ }
+ ],
'email' : [
['render'],
function(e) {
if (id == 'search_depth') {
query[id] = node.firstChild.getAttribute('value');
} else {
- var value = node.value.replace(/^\s+/,'').replace(/[\\\s]+$/,'');
+ var value = node.value.replace(/^\s+/,'').replace(/[\\\s]+$/,'');
//value = value.replace(/\d/g,'');
switch(id) {
case 'family_name' :
value="&staff.patron_search_form.post_code.label;"
accesskey="&staff.patron_search_form.post_code.accesskey;"/>
<textbox id="post_code" group="1" context="clipboard" tabindex="8"/>
+ <spacer flex="1"/>
+ <spacer flex="1"/>
+ <label id="psl6d" control="egid"
+ value="&staff.patron_search_form.egid.label;"
+ accesskey="&staff.patron_search_form.egid.accesskey;"/>
+ <textbox id="egid" group="0" context="clipboard" tabindex="16"/>
</row>
</rows>
</grid>
accesskey="&staff.patron_search_form.card.accesskey;"/>
<textbox id="card" group="0" context="clipboard"/>
</row>
+ <row id="psr6d">
+ <label id="psl6d" control="egid"
+ value="&staff.patron_search_form.egid.label;"
+ accesskey="&staff.patron_search_form.egid.accesskey;"/>
+ <textbox id="egid" group="0" context="clipboard"/>
+ </row>
<row id="psr6a">
<label id="psl6a" value=" "/>
</row>
obj.search_term_count++;
break;
+ case 'egid':
+ search_hash[ i ] = {};
+ search_hash[ i ].value = query[i];
+ search_hash[i].group = 4;
+ obj.search_term_count++;
+ break;
+
case 'phone': case 'ident':
search_hash[ i ] = {};