From 03941cc684a2eb13c8e7f3cb64ff8474758d02e2 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 9 Feb 2024 08:26:33 +0000 Subject: [PATCH] Bug 34478: Changes for tools/scheduler Signed-off-by: Jonathan Druart --- .../prog/en/modules/tools/scheduler.tt | 4 ++-- tools/scheduler.pl | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt index 36c589f062..9802dcfcbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/scheduler.tt @@ -41,7 +41,7 @@
[% INCLUDE 'csrf-token.inc' %] - +
Task scheduler
    @@ -91,7 +91,7 @@ [% FOREACH JOB IN JOBS %] [% INCLUDE 'csrf-token.inc' %] - + [% JOB.TIME | html %] diff --git a/tools/scheduler.pl b/tools/scheduler.pl index 4271804483..91a1cd23c8 100755 --- a/tools/scheduler.pl +++ b/tools/scheduler.pl @@ -49,10 +49,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my $mode = $input->param('mode'); -my $id = $input->param('id'); +my $op = $input->param('op'); +my $id = $input->param('id'); -if ( $mode eq 'job_add' ) { +if ( $op eq 'cud-add' ) { my $startdate = dt_from_string( scalar $input->param('startdate'), 'iso' )->ymd; @@ -100,13 +100,9 @@ if ( $mode eq 'job_add' ) { else { $template->param( job_add_failed => 1 ); } -} - -if ( $mode eq 'job_change' ) { +} elsif ( $op eq 'cud-change' ) { my $jobid = $input->param('jobid'); - if ( $input->param('cud-delete') ) { - remove_at_job($jobid); - } + remove_at_job($jobid); } my $jobs = get_jobs(); -- 2.39.5