From 990182a37cdae04bc3a87452b6330fa7d05a500e Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 13 Jul 2018 14:34:34 +0800 Subject: [PATCH] * Submit form by ajax. --- module/project/control.php | 4 ++-- module/project/view/edit.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index a141cf575a..28dc863409 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1063,7 +1063,7 @@ class project extends control { $changes = $this->project->update($projectID); $this->project->updateProducts($projectID); - if(dao::isError()) die(js::error(dao::getError())); + if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); if($action == 'undelete') { $this->loadModel('action'); @@ -1076,7 +1076,7 @@ class project extends control $actionID = $this->loadModel('action')->create('project', $projectID, 'edited'); $this->action->logHistory($actionID, $changes); } - die(js::locate($this->createLink('project', 'view', "projectID=$projectID"), 'parent')); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "projectID=$projectID"))); } /* Set menu. */ diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index 8ee356120b..fed8fc47c2 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -23,7 +23,7 @@ arrow . ' ' . $lang->project->edit;?> -
+
project->name;?>