From e513541238afaac147c289f386a79ca6db85f839 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 30 Jan 2024 16:05:57 +0000 Subject: [PATCH] Bug 34478: Manual fix - problem_reports Signed-off-by: Jonathan Druart --- .../prog/en/modules/tools/problem-reports.tt | 6 +++--- opac/opac-reportproblem.pl | 2 +- tools/problem-reports.pl | 12 ++++-------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt index 0bb60dc9fb..52acc03cbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt @@ -58,9 +58,9 @@
[% INCLUDE 'csrf-token.inc' %]
- - - + + +
diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl index 5ef7e6c374..f3842482af 100755 --- a/opac/opac-reportproblem.pl +++ b/opac/opac-reportproblem.pl @@ -97,7 +97,7 @@ if ( $op eq 'cud-addreport' ) { } ); - my $transport = 'cud-email'; + my $transport = 'email'; my $reply_address = $patron->email || $patron->emailpro || $patron->B_email; if ( $recipient eq 'library' and defined($library->inbound_email_address) and $library->inbound_email_address ne C4::Context->preference('KohaAdminEmailAddress') ) { diff --git a/tools/problem-reports.pl b/tools/problem-reports.pl index 31a3671b68..2615db4429 100755 --- a/tools/problem-reports.pl +++ b/tools/problem-reports.pl @@ -37,26 +37,22 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $action; -foreach (qw( viewed closed new )) { - $action = $_ if ( $query->param("mark_selected-$_") ); -} -$action ||= 'none'; +my $action = $query->param("op") || 'none'; my @report_ids = $query->multi_param('report_ids'); -if ( $action eq 'viewed' ) { +if ( $action eq 'cud-mark_selected-viewed' ) { foreach my $report_id ( @report_ids ) { my $report = Koha::ProblemReports->find($report_id); $report->set({ status => 'Viewed' })->store; } -} elsif ( $action eq 'closed' ) { +} elsif ( $action eq 'cud-mark_selected-closed' ) { foreach my $report_id ( @report_ids ) { my $report = Koha::ProblemReports->find($report_id); $report->set({ status => 'Closed' })->store; } -} elsif ( $action eq 'new' ) { +} elsif ( $action eq 'cud-mark_selected-new' ) { foreach my $report_id ( @report_ids ) { my $report = Koha::ProblemReports->find($report_id); $report->set({ status => 'New' })->store; -- 2.39.5