* Rewrite activate page.

This commit is contained in:
daitingting
2018-05-14 16:03:43 +08:00
parent ca74933fdc
commit 6473e52976
3 changed files with 25 additions and 28 deletions
+3 -3
View File
@@ -525,7 +525,7 @@ class testtask extends control
if(!empty($_POST))
{
$changes = $this->testtask->activate($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
@@ -533,8 +533,8 @@ class testtask extends control
$this->action->logHistory($actionID, $changes);
}
if(isonlybody()) die(js::reload('parent.parent'));
die(js::locate($this->createLink('testtask', 'view', "taskID=$taskID"), 'parent'));
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID")));
}
/* Get task info. */