diff --git a/circ/checkout-notes.pl b/circ/checkout-notes.pl index 9f5e1c7bdf..0d3a80f4c0 100755 --- a/circ/checkout-notes.pl +++ b/circ/checkout-notes.pl @@ -36,20 +36,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $action; -foreach (qw( seen notseen )) { - $action = $_ if ( $query->param("mark_selected-$_") ); -} -$action ||= 'none'; +my $op = $query->param("op") || 'none'; my @issue_ids = $query->multi_param('issue_ids'); -if ( $action eq 'seen' ) { +if ( $op eq 'cud-seen' ) { foreach my $issue_id ( @issue_ids ) { my $issue = Koha::Checkouts->find($issue_id); $issue->set({ noteseen => 1 })->store; } -} elsif ( $action eq 'notseen' ) { +} elsif ( $op eq 'cud-notseen' ) { foreach my $issue_id ( @issue_ids ) { my $issue = Koha::Checkouts->find($issue_id); $issue->set({ noteseen => 0 })->store; @@ -59,7 +55,7 @@ if ( $action eq 'seen' ) { my $notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'patron', { item => 'biblionumber' } ] }); $template->param( selected_count => scalar(@issue_ids), - action => $action, + op => $op, notes => $notes, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt index 8003a17ee6..86f486f2ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt @@ -50,9 +50,9 @@ [% IF ( selected_count ) %]