* [task#141983,doing,1h] Modify the problem of code review.
This commit is contained in:
@@ -64,6 +64,7 @@ $config->doc->form->create['templateType'] = array('type' => 'string', 'requir
|
||||
$config->doc->form->create['chapterType'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
|
||||
$config->doc->form->createtemplate = $config->doc->form->create;
|
||||
$config->doc->form->createtemplate['templateDesc'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
|
||||
$config->doc->form->edit['title'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->doc->form->edit['product'] = array('type' => 'int', 'required' => false, 'default' => 0);
|
||||
@@ -88,6 +89,7 @@ $config->doc->form->edit['editedBy'] = array('type' => 'string', 'required'
|
||||
$config->doc->form->edit['editedDate'] = array('type' => 'datetime', 'required' => false, 'default' => $now);
|
||||
|
||||
$config->doc->form->edittemplate = $config->doc->form->edit;
|
||||
$config->doc->form->edittemplate['templateDesc'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
|
||||
$config->doc->form->movelib['space'] = array('type' => 'string', 'required' => true, 'default' => '');
|
||||
$config->doc->form->movelib['acl'] = array('type' => 'string', 'required' => true, 'default' => '');
|
||||
|
||||
@@ -658,7 +658,6 @@ class doc extends control
|
||||
->setDefault('addedBy', $this->app->user->account)
|
||||
->setDefault('editedBy', $this->app->user->account)
|
||||
->get();
|
||||
$docData->templateDesc = zget($_POST, 'desc', '');
|
||||
|
||||
$_POST['type'] = 'docTemplate';
|
||||
|
||||
@@ -673,7 +672,7 @@ class doc extends control
|
||||
$docData->templateType = $parentTemplate->templateType;
|
||||
}
|
||||
|
||||
$docResult = $this->doc->create($docData, $this->post->labels);
|
||||
$docResult = $this->doc->create($docData);
|
||||
if(!$docResult || dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->docZen->responseAfterCreate($docResult, 'docTemplate');
|
||||
}
|
||||
@@ -701,7 +700,6 @@ class doc extends control
|
||||
->setIF(!isset($_POST['parent']), 'parent', $doc->parent)
|
||||
->setIF(strpos(",$doc->editedList,", ",{$this->app->user->account},") === false, 'editedList', $doc->editedList . ",{$this->app->user->account}")
|
||||
->get();
|
||||
if(isset($_POST['desc'])) $docData->templateDesc = $_POST['desc'];
|
||||
|
||||
$_POST['type'] = 'docTemplate';
|
||||
$result = $this->doc->update($docID, $docData);
|
||||
@@ -838,7 +836,7 @@ class doc extends control
|
||||
$docData->module = $parentDoc->module;
|
||||
}
|
||||
|
||||
$docResult = $this->doc->create($docData, $this->post->labels);
|
||||
$docResult = $this->doc->create($docData);
|
||||
if(!$docResult || dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->docZen->responseAfterCreate($docResult);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const savingDocData = {};
|
||||
let docBasicModal = {};
|
||||
let currentUser = null;
|
||||
/**
|
||||
* 获取文档界面上的表格初始化选项。
|
||||
* Get the table initialization options on the doc UI.
|
||||
|
||||
@@ -60,7 +60,7 @@ formPanel
|
||||
$modalType != 'chapter' ? formGroup
|
||||
(
|
||||
set::label($lang->docTemplate->desc),
|
||||
textarea(set::name('desc'), set::value($docID ? $doc->templateDesc : ''), set::rows(3))
|
||||
textarea(set::name('templateDesc'), set::value($docID ? $doc->templateDesc : ''), set::rows(3))
|
||||
) : null,
|
||||
empty($parentID) ? formGroup
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user