@@ -, +, @@
borrowernumber
Cardnumber already in list
Cardnumber not in list
Non-existent cardnumber
---
Koha/List/Patron.pm | 18 +++----
.../prog/en/modules/patron_lists/list.tt | 47 ++++++++++++-------
patron_lists/list.pl | 25 ++++++----
t/db_dependent/PatronLists.t | 9 +++-
4 files changed, 63 insertions(+), 36 deletions(-)
--- a/Koha/List/Patron.pm
+++ a/Koha/List/Patron.pm
@@ -173,17 +173,19 @@ sub AddPatronsToList {
my @borrowernumbers;
+ my %search_param;
if ($cardnumbers) {
- @borrowernumbers =
- Koha::Database->new()->schema()->resultset('Borrower')->search(
- { cardnumber => { 'IN' => $cardnumbers } },
- { columns => [qw/ borrowernumber /] }
- )->get_column('borrowernumber')->all();
- }
- else {
- @borrowernumbers = @$borrowernumbers;
+ $search_param{cardnumber} = { 'IN' => $cardnumbers };
+ } else {
+ $search_param{borrowernumber} = { 'IN' => $borrowernumbers };
}
+ @borrowernumbers =
+ Koha::Database->new()->schema()->resultset('Borrower')->search(
+ \%search_param,
+ { columns => [qw/ borrowernumber /] }
+ )->get_column('borrowernumber')->all();
+
my $patron_list_id = $list->patron_list_id();
my $plp_rs = Koha::Database->new()->schema()->resultset('PatronListPatron');
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt
@@ -12,10 +12,10 @@
#add_patrons_by_search {
display: none;
}
- #patron_barcodes_line {
+ #patron_ids_line {
display: none;
}
- #patron_barcodes_submit {
+ #patron_ids_submit {
display: none;
}
#searchheader {
@@ -58,10 +58,10 @@
[% list.name | html %]
[% IF ( not_found.size > 0 ) %]
- Warning, the following cardnumbers were not found:
+ Warning, the following [% id_column | html %] were not found:
- Cardnumbers not found |
+ [% id_column | html FILTER ucfirst %] not found |
[% FOREACH nf IN not_found %]
@@ -72,10 +72,10 @@
[% END %]
[% IF ( existed.size > 0 ) %]
- Warning, the following cardnumbers were already in this list:
+ Warning, the following [% id_column | html %] were already in this list:
- Cardnumbers already in list |
+ [% id_column | html FILTER ucfirst %] already in list |
[% FOREACH ed IN existed %]
@@ -96,16 +96,29 @@
Search for patrons
-
+
- Enter multiple card numbers
-
-
-
+ Add multiple patrons
+
+
+
+
-