bug fixing
This commit is contained in:
parent
16c84a5d82
commit
02f64b827b
3 changed files with 63 additions and 2 deletions
|
|
@ -592,6 +592,8 @@ sub www_view {
|
|||
return "";
|
||||
}
|
||||
$self->logView();
|
||||
# must find a way to do this next line better
|
||||
$self->session->http->setCookie("wgSession",$self->session->var->{_var}{sessionId}) unless $self->session->var->{_var}{sessionId} eq $self->session->http->getCookies->{"wgSession"};
|
||||
$self->session->http->getHeader;
|
||||
$self->prepareView;
|
||||
my $style = $self->processStyle("~~~");
|
||||
|
|
|
|||
|
|
@ -155,7 +155,52 @@ sub www_editCronJob {
|
|||
hoverHelp=>$i18n->get("day of week help")
|
||||
);
|
||||
$f->submit;
|
||||
return WebGUI::AdminConsole->new($session,"cron")->render($f->print);
|
||||
my $ac = WebGUI::AdminConsole->new($session,"cron");
|
||||
$ac->addSubmenuItem($session->url->page("op=editCronJob"), $i18n->get("add a new task"));
|
||||
return $ac->render($f->print);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_editCronJobSave ( )
|
||||
|
||||
Saves the results of www_editCronJob()
|
||||
|
||||
=cut
|
||||
|
||||
sub www_editCronJobSave {
|
||||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
|
||||
if ($session->form->get("id") eq "new") {
|
||||
WebGUI::Workflow::Cron->create($session,{
|
||||
monthOfYear=>$session->form->get("monthOfYear"),
|
||||
dayOfMonth=>$session->form->get("dayOfMonth"),
|
||||
minuteOfHour=>$session->form->get("minuteOfHour"),
|
||||
hourOfDay=>$session->form->get("hourOfDay"),
|
||||
dayOfWeek=>$session->form->get("dayOfWeek"),
|
||||
enabled=>$session->form->get("enabled","yesNo"),
|
||||
runOnce=>$session->form->get("runOnce","yesNo"),
|
||||
priority=>$session->form->get("priority","radioList"),
|
||||
workflowId=>$session->form->get("workflowId","workflow"),
|
||||
title=>$session->form->get("title"),
|
||||
});
|
||||
} else {
|
||||
my $cron = WebGUI::Workflow::Cron->new($session, $session->form->get("id"));
|
||||
$cron->set({
|
||||
monthOfYear=>$session->form->get("monthOfYear"),
|
||||
dayOfMonth=>$session->form->get("dayOfMonth"),
|
||||
minuteOfHour=>$session->form->get("minuteOfHour"),
|
||||
hourOfDay=>$session->form->get("hourOfDay"),
|
||||
dayOfWeek=>$session->form->get("dayOfWeek"),
|
||||
enabled=>$session->form->get("enabled","yesNo"),
|
||||
runOnce=>$session->form->get("runOnce","yesNo"),
|
||||
priority=>$session->form->get("priority","radioList"),
|
||||
workflowId=>$session->form->get("workflowId","workflow"),
|
||||
title=>$session->form->get("title"),
|
||||
});
|
||||
}
|
||||
return www_manageCron($session);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -182,7 +227,9 @@ sub www_manageCron {
|
|||
."</td></tr>\n";
|
||||
}
|
||||
$output .= '</table>';
|
||||
return WebGUI::AdminConsole->new($session,"cron")->render($output);
|
||||
my $ac = WebGUI::AdminConsole->new($session,"cron");
|
||||
$ac->addSubmenuItem($session->url->page("op=editCronJob"), $i18n->get("add a new task"));
|
||||
return $ac->render($output);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -145,12 +145,24 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'are you sure you want to delete this scheduled task' => {
|
||||
message => q|Are you certain you wish to delete this task?|,
|
||||
context => q|The question asked before deleteing a cron job.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'disabled' => {
|
||||
message => q|Disabled|,
|
||||
context => q|A label to indicate that the cron job is not ready to run.|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'add a new task' => {
|
||||
message => q|Add a new task.|,
|
||||
context => q|clicking on this text linked will add a new cron job|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'topicName' => {
|
||||
message => q|Scheduler|,
|
||||
context => q|The title of the cron/scheduler interface.|,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue