* Submit form by ajax.

This commit is contained in:
liugang
2018-07-13 14:34:34 +08:00
parent c5b4a54b09
commit 990182a37c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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. */
+1 -1
View File
@@ -23,7 +23,7 @@
<small><?php echo $lang->arrow . ' ' . $lang->project->edit;?></small>
</h2>
</div>
<form class='load-indicator main-form' method='post' target='hiddenwin' id='dataform'>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->project->name;?></th>