Bug 34478: Changes for tools/scheduler
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
6a366faf3f
commit
03941cc684
2 changed files with 7 additions and 11 deletions
|
@ -41,7 +41,7 @@
|
|||
|
||||
<form name="form1" action="scheduler.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="mode" value="job_add" />
|
||||
<input type="hidden" name="op" value="cud-add" />
|
||||
|
||||
<fieldset class="rows">
|
||||
<legend>Task scheduler</legend><ol>
|
||||
|
@ -91,7 +91,7 @@
|
|||
[% FOREACH JOB IN JOBS %]
|
||||
<form action="scheduler.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="mode" value="job_change" />
|
||||
<input type="hidden" name="op" value="cud-change" />
|
||||
|
||||
<tr>
|
||||
<td>[% JOB.TIME | html %]</td>
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue