diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt index 9c9dbd7edb..8d3df53bce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt @@ -1,6 +1,8 @@ [% USE raw %] [% USE KohaDates %] [% SET footerjs = 1 %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'patron-search.inc' %] [% INCLUDE 'doc-head-open.inc' %]
- Add recipients + Add recipients [% IF memberloop %] Delete all [% END %] @@ -116,10 +119,6 @@ [% MACRO jsinclude BLOCK %] + + [% INCLUDE 'select2.inc' %] + [% SET columns = ['cardnumber','name','category','branch','action'] %] + [% PROCESS patron_search_modal columns => columns, modal_title => t("Add recipients") %] + [% PROCESS patron_search_js columns => columns, actions => ["add"], preview_on_name_click => 1 %] + + [% END %] diff --git a/serials/routing.pl b/serials/routing.pl index 13f86fad35..acf88a7e8d 100755 --- a/serials/routing.pl +++ b/serials/routing.pl @@ -41,7 +41,7 @@ my $query = CGI->new; my $subscriptionid = $query->param('subscriptionid'); my $serialseq = $query->param('serialseq'); my $routingid = $query->param('routingid'); -my $borrowernumber = $query->param('borrowernumber'); +my $borrowernumbers = $query->param('borrowernumbers'); my $notes = $query->param('notes'); my $op = $query->param('op') || q{}; my $date_selected = $query->param('date_selected'); @@ -66,8 +66,10 @@ if($op eq 'cud-delete'){ delroutingmember($routingid,$subscriptionid); } -if($op eq 'cud-add'){ - addroutingmember($borrowernumber,$subscriptionid); +if ( $op eq 'cud-add_new_recipients' ) { + for my $borrowernumber ( split ':', $borrowernumbers ) { + addroutingmember( $borrowernumber, $subscriptionid ); + } } if($op eq 'cud-save'){ my $sth = $dbh->prepare('UPDATE serial SET routingnotes = ? WHERE subscriptionid = ?');