@@ -, +, @@ --- .../prog/en/modules/serials/routing.tt | 60 ++++++++++++++----- serials/routing.pl | 8 ++- 2 files changed, 51 insertions(+), 17 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt +++ a/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' %] [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %] › [% title | html %] › Serials › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -87,9 +89,10 @@ [% END %] [% END %] +

- Add recipients + Add recipients [% IF memberloop %] Delete all [% END %] @@ -115,10 +118,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 %] --- a/serials/routing.pl +++ a/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 'delete'){ delroutingmember($routingid,$subscriptionid); } -if($op eq 'add'){ - addroutingmember($borrowernumber,$subscriptionid); +if ( $op eq 'add_new_recipients' ) { + for my $borrowernumber ( split ':', $borrowernumbers ) { + addroutingmember( $borrowernumber, $subscriptionid ); + } } if($op eq 'save'){ my $sth = $dbh->prepare('UPDATE serial SET routingnotes = ? WHERE subscriptionid = ?'); --