use new cron API

This commit is contained in:
Jamie Cameron
2014-02-02 15:11:19 -08:00
parent 204590630a
commit d96c7f3720
3 changed files with 14 additions and 16 deletions

View File

@@ -86,10 +86,7 @@ print &ui_table_row($text{'edit_sched'},
&ui_radio("sched", $job || $in{'new'} ? 1 : 0,
[ [ 0, $text{'no'} ],
[ 1, $text{'edit_schedyes'} ] ]));
print &ui_table_row(undef,
"<tr> <td colspan=2><table border width=100%>\n".
&capture_function_output(\&cron::show_times_input, $backup).
"</table></td> </tr>\n");
print &cron::get_times_input($backup);
print &ui_hidden_table_end();
if ($in{'new'}) {

View File

@@ -35,20 +35,20 @@ if ($runparts) {
}
else {
# Offer to enable/change/delete
print "<form action=save_sched.cgi>\n";
print "<input type=hidden name=idx value='",
$job ? $job->{'index'} : "","'>\n";
print "<b>$text{'sched_sched'}</b>\n";
printf "<input type=radio name=sched value=0 %s> %s\n",
$job ? "" : "checked", $text{'sched_disabled'};
printf "<input type=radio name=sched value=1 %s> %s<br>\n",
$job ? "checked" : "", $text{'sched_enabled'};
print &ui_form_start("save_sched.cgi", "post");
print &ui_hidden("idx", $job ? $job->{'index'} : "");
print &ui_table_start(undef, undef, 2);
print &ui_table_row($text{'sched_sched'},
&ui_radio("sched", $job ? 1 : 0,
[ [ 0, $text{'sched_disabled'} ],
[ 1, $text{'sched_enabled'} ] ]));
$job ||= { 'special' => 'daily' };
print "<table border>\n";
&cron::show_times_input($job);
print "</table>\n";
print "<input type=submit value='$text{'sched_save'}'></form>\n";
print &cron::get_times_input($job, 0, 2, $text{'sched_when'});
print &ui_table_end();
print &ui_form_end([ [ undef, $text{'sched_save'} ] ]);
}
&ui_print_footer("", $text{'index_return'});

View File

@@ -100,6 +100,7 @@ sched_disabled=Disabled
sched_enabled=Enabled, at times below ..
sched_save=Update Cron Job
sched_err=Failed to save rotation schedule
sched_when=Times to run
force_title=Force Log Rotation
force_doing=Forcing the immediate rotation of all log files ..