@@ -, +, @@ in the patron account --- koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt | 4 ++-- members/notices.pl | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -16,7 +16,7 @@ $(".notice").hide(); $(".notice-title").click(function(e){ - $(this).next(".notice").toggle(); + $(this).closest("tr").children().children(".notice").toggle(); e.preventDefault(); }); @@ -70,7 +70,7 @@ [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending - [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed + [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
Resend
[% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted [% ELSE %][% QUEUED_MESSAGE.status %][% END %] --- a/members/notices.pl +++ a/members/notices.pl @@ -53,6 +53,20 @@ $template->param( picture => 1 ) if $picture; # Getting the messages my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber}); +if ($input->param('resendnotice')) { + foreach my $message (@$queued_messages){ + if ($message->{message_id} == $input->param('resendnotice')) { + last unless $message->{status} eq "failed"; + + $message->{status} = 'pending' if (C4::Letters::_set_message_status( { + message_id => $message->{message_id}, + status => 'pending' + } ) > 0); + last; + } + } +} + if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = GetBorrowerAttributes($borrowernumber); $template->param( --