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

(-)a/circ/ysearch.pl (-2 / +3 lines)
Lines 44-50 if ($auth_status ne "ok") { Link Here
44
}
44
}
45
45
46
my $dbh = C4::Context->dbh;
46
my $dbh = C4::Context->dbh;
47
my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, country
47
my $sql = qq(SELECT borrowernumber, surname, firstname, cardnumber, address, city, zipcode, country
48
             FROM borrowers
48
             FROM borrowers
49
             WHERE surname LIKE ?
49
             WHERE surname LIKE ?
50
             OR firstname LIKE ?
50
             OR firstname LIKE ?
Lines 58-64 print "["; Link Here
58
my $i = 0;
58
my $i = 0;
59
while ( my $rec = $sth->fetchrow_hashref ) {
59
while ( my $rec = $sth->fetchrow_hashref ) {
60
    if($i > 0){ print ","; }
60
    if($i > 0){ print ","; }
61
    print "{\"surname\":\"" . $rec->{surname} . "\",\"" .
61
    print "{\"borrowernumber\":\"" . $rec->{borrowernumber} . "\",\"" .
62
          "surname\":\"".$rec->{surname} . "\",\"" .
62
          "firstname\":\"".$rec->{firstname} . "\",\"" .
63
          "firstname\":\"".$rec->{firstname} . "\",\"" .
63
          "cardnumber\":\"".$rec->{cardnumber} . "\",\"" .
64
          "cardnumber\":\"".$rec->{cardnumber} . "\",\"" .
64
          "address\":\"".$rec->{address} . "\",\"" .
65
          "address\":\"".$rec->{address} . "\",\"" .
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt (-1 / +15 lines)
Lines 121-126 td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
121
		$("*").ajaxError(function(evt, request, settings){
121
		$("*").ajaxError(function(evt, request, settings){
122
			if ((alerted +=1) <= 1){ window.alert(_("AJAX error")+" (" + alerted + " alert)"); }
122
			if ((alerted +=1) <= 1){ window.alert(_("AJAX error")+" (" + alerted + " alert)"); }
123
		});
123
		});
124
        var reviewerField = $("#approver");
125
        reviewerField.autocomplete({
126
            source: "/cgi-bin/koha/circ/ysearch.pl",
127
            minLength: 3,
128
            select: function( event, ui ) {
129
                reviewerField.val( ui.item.borrowernumber );
130
                return false;
131
            }
132
        })
133
        .data( "autocomplete" )._renderItem = function( ul, item ) {
134
            return $( "<li></li>" )
135
            .data( "item.autocomplete", item )
136
            .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
137
            .appendTo( ul );
138
        };
124
	});
139
	});
125
//]]>
140
//]]>
126
</script>
141
</script>
127
- 

Return to bug 2693