View | Details | Raw Unified | Return to bug 10565
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 surname, firstname, cardnumber, address, city, zipcode, country, borrowernumber
48
             FROM borrowers
48
             FROM borrowers
49
             WHERE surname LIKE ?
49
             WHERE surname LIKE ?
50
             OR firstname LIKE ?
50
             OR firstname LIKE ?
Lines 64-71 while ( my $rec = $sth->fetchrow_hashref ) { Link Here
64
          "address\":\"".$rec->{address} . "\",\"" .
64
          "address\":\"".$rec->{address} . "\",\"" .
65
          "city\":\"".$rec->{city} . "\",\"" .
65
          "city\":\"".$rec->{city} . "\",\"" .
66
          "zipcode\":\"".$rec->{zipcode} . "\",\"" .
66
          "zipcode\":\"".$rec->{zipcode} . "\",\"" .
67
          "borrowernumber\":\"".$rec->{borrowernumber} . "\",\"" .
67
          "country\":\"".$rec->{country} . "\"" .
68
          "country\":\"".$rec->{country} . "\"" .
68
          "}";
69
          "}";
69
    $i++;
70
    $i++;
70
}
71
}
71
print "]";
72
print "]";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-5 / +5 lines)
Lines 23-31 $(document).ready(function() { Link Here
23
    }));
23
    }));
24
    $( "#find_patron" ).autocomplete({
24
    $( "#find_patron" ).autocomplete({
25
        source: "/cgi-bin/koha/circ/ysearch.pl",
25
        source: "/cgi-bin/koha/circ/ysearch.pl",
26
        minLength: 3,
26
        minLength: 1,
27
        select: function( event, ui ) {
27
        select: function( event, ui ) {
28
            AddPatron( ui.item.surname + ", " + ui.item.firstname, ui.item.cardnumber );
28
            AddPatron( ui.item.surname + ", " + ui.item.firstname, ui.item.borrowernumber );
29
            return false;
29
            return false;
30
        }
30
        }
31
    })
31
    })
Lines 54-66 $(document).ready(function() { Link Here
54
    });
54
    });
55
});
55
});
56
56
57
function AddPatron( name, cardnumber ) {
57
function AddPatron( name, borrowernumber ) {
58
    div = "<p>" + name + " ( <a href=\"#\" class=\"remove_patron\"> " + _("Remove") + " </a> ) <input type='hidden' name='patrons_to_add' value='" + cardnumber + "' /></p>";
58
    div = "<p>" + name + " ( <a href=\"#\" class=\"remove_patron\"> " + _("Remove") + " </a> ) <input type='hidden' name='patrons_to_add' value='" + borrowernumber + "' /></p>";
59
    $('#patrons_to_add').append( div );
59
    $('#patrons_to_add').append( div );
60
60
61
    $('#find_patron').val('').focus();
61
    $('#find_patron').val('').focus();
62
62
63
    $('#patrons_to_add_fieldset').show(  );
63
    $('#patrons_to_add_fieldset').show();
64
}
64
}
65
//]]>
65
//]]>
66
</script>
66
</script>
(-)a/patron_lists/list.pl (-2 / +1 lines)
Lines 42-48 my ($list) = Link Here
42
42
43
my @patrons_to_add = $cgi->param('patrons_to_add');
43
my @patrons_to_add = $cgi->param('patrons_to_add');
44
if (@patrons_to_add) {
44
if (@patrons_to_add) {
45
    AddPatronsToList( { list => $list, cardnumbers => \@patrons_to_add } );
45
    AddPatronsToList( { list => $list, borrowernumbers => \@patrons_to_add } );
46
}
46
}
47
47
48
my @patrons_to_remove = $cgi->param('patrons_to_remove');
48
my @patrons_to_remove = $cgi->param('patrons_to_remove');
49
- 

Return to bug 10565