View | Details | Raw Unified | Return to bug 9407
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (+6 lines)
Lines 63-68 YAHOO.util.Event.onContentReady("header_search", function() { Link Here
63
          <option value='streettype,address,address2,city,state,zipcode,country'>Street Address</option>
63
          <option value='streettype,address,address2,city,state,zipcode,country'>Street Address</option>
64
      </select>
64
      </select>
65
65
66
      <label for="searchtype">Search type:</label>
67
      <select name="searchtype" id="searchtype">
68
          <option selected="selected" value=''>Standard</option>
69
          <option value='contain'>Contains</option>
70
      </select>
71
66
    <label for="orderby">Order by:</label>
72
    <label for="orderby">Order by:</label>
67
    <select name="orderby" id="searchorderby">
73
    <select name="orderby" id="searchorderby">
68
    <option value="surname,0">Surname</option>
74
    <option value="surname,0">Surname</option>
(-)a/members/member.pl (-2 / +7 lines)
Lines 101-113 my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", Link Here
101
$member =~ s/,//g;   #remove any commas from search string
101
$member =~ s/,//g;   #remove any commas from search string
102
$member =~ s/\*/%/g;
102
$member =~ s/\*/%/g;
103
103
104
my $searchtype = $input->param('searchtype');
105
my %searchtype_ok = ( 'contain' => 1 );
106
if ( !defined($searchtype_ok{$searchtype}) ) {
107
    undef $searchtype;
108
}
109
104
my $from = ( $startfrom - 1 ) * $resultsperpage;
110
my $from = ( $startfrom - 1 ) * $resultsperpage;
105
my $to   = $from + $resultsperpage;
111
my $to   = $from + $resultsperpage;
106
112
107
my ($count,$results);
113
my ($count,$results);
108
if ($member || keys %$patron) {
114
if ($member || keys %$patron) {
109
    #($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"]  );
115
    #($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"]  );
110
    my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" );
116
    my $search_scope = $searchtype || ( $quicksearch ? "field_start_with" : "start_with" );
111
    ($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope );
117
    ($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope );
112
}
118
}
113
119
114
- 

Return to bug 9407