diff --git a/module/admin/control.php b/module/admin/control.php
index 6b423dcc40..33b0d415cf 100644
--- a/module/admin/control.php
+++ b/module/admin/control.php
@@ -140,7 +140,7 @@ class admin extends control
if(!$result) die(js::alert($this->lang->admin->clearDataFailed));
- js::alert($this->lang->admin->clearDataSuccessfully);
+ echo js::alert($this->lang->admin->clearDataSuccessfully);
die(js::locate(inLink('index'), 'parent'));
}
diff --git a/module/custom/control.php b/module/custom/control.php
index b80c365c94..044809ba13 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -39,18 +39,25 @@ class custom extends control
$fieldList = $this->lang->$module->$field;
if(!empty($_POST))
{
- $lang = $_POST['lang'];
- $this->custom->deleteItems("lang=$lang&module=$module§ion=$field");
- foreach($_POST['keys'] as $index => $key)
+ if($module == 'story' && $field == 'review')
{
- $value = $_POST['values'][$index];
- if(!$value or !$key) continue;
- $system = $_POST['systems'][$index];
+ $this->loadModel('setting')->setItem('system.common.storyReview.needReview', $_POST['needReview']);
+ }
+ else
+ {
+ $lang = $_POST['lang'];
+ $this->custom->deleteItems("lang=$lang&module=$module§ion=$field");
+ foreach($_POST['keys'] as $index => $key)
+ {
+ $value = $_POST['values'][$index];
+ if(!$value or !$key) continue;
+ $system = $_POST['systems'][$index];
- /* the length of role is 20, check it when save. */
- if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole));
+ /* the length of role is 20, check it when save. */
+ if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole));
- $this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
+ $this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
+ }
}
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
@@ -59,6 +66,7 @@ class custom extends control
$this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->$module->common;
$this->view->position[] = $this->lang->custom->common;
$this->view->position[] = $this->lang->$module->common;
+ $this->view->needReview = isset($this->config->storyReview->needReview) ? $this->config->storyReview->needReview : 1;
$this->view->fieldList = $fieldList;
$this->view->dbFields = $this->custom->getItems("lang=$currentLang,all&module=$module§ion=$field");
$this->view->field = $field;
diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php
index 47cbec20d6..b871626fca 100644
--- a/module/custom/lang/en.php
+++ b/module/custom/lang/en.php
@@ -21,6 +21,7 @@ $lang->custom->story->fields['reasonList'] = 'Closed reason';
$lang->custom->story->fields['reviewResultList'] = 'Reviewed result';
$lang->custom->story->fields['stageList'] = 'Stage';
$lang->custom->story->fields['statusList'] = 'Status';
+$lang->custom->story->fields['review'] = 'Review';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['priList'] = 'Priority';
@@ -64,3 +65,7 @@ $lang->custom->confirmRestore = 'Are you sure to restore the default lang settin
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = 'The length of key must be less than 20!';
+
+$lang->custom->storyReview = 'Story review';
+$lang->custom->reviewList[1] = 'Open';
+$lang->custom->reviewList[0] = 'Close';
diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php
index 2edeb44bac..b505c34f1f 100644
--- a/module/custom/lang/zh-cn.php
+++ b/module/custom/lang/zh-cn.php
@@ -21,6 +21,7 @@ $lang->custom->story->fields['reasonList'] = '关闭原因';
$lang->custom->story->fields['reviewResultList'] = '评审结果';
$lang->custom->story->fields['stageList'] = '阶段';
$lang->custom->story->fields['statusList'] = '状态';
+$lang->custom->story->fields['review'] = '评审';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['priList'] = '优先级';
@@ -64,3 +65,7 @@ $lang->custom->confirmRestore = '是否要恢复默认语言配置?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
+
+$lang->custom->storyReview = '需求评审';
+$lang->custom->reviewList[1] = '开启';
+$lang->custom->reviewList[0] = '关闭';
diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php
index 3f28999418..b20c97d25f 100644
--- a/module/custom/view/set.html.php
+++ b/module/custom/view/set.html.php
@@ -60,6 +60,15 @@ EOT;
custom->object[$module] . ' >> ' . $lang->custom->$module->fields[$field]?>
+
+
+
+ | custom->storyReview;?> |
+ custom->reviewList, $needReview);?> |
+ |
+
+
+
| custom->key;?> |
@@ -92,6 +101,7 @@ EOT;
+
diff --git a/module/story/control.php b/module/story/control.php
index 00d3e6abb3..68dcffcc8a 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -164,6 +164,7 @@ class story extends control
$this->view->verify = $verify;
$this->view->keywords = $keywords;
$this->view->mailto = $mailto;
+ $this->view->needReview = ($projectID > 0 || (isset($this->config->storyReview->needReview) && $this->config->storyReview->needReview == 0 )) ? "checked='checked'" : "";
$this->display();
}
@@ -422,6 +423,7 @@ class story extends control
$this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title;
$this->view->users = $this->user->getPairs('nodeleted|pofirst', $this->view->story->assignedTo);
$this->view->position[] = $this->lang->story->change;
+ $this->view->needReview = (isset($this->config->storyReview->needReview) && $this->config->storyReview->needReview == 0) ? "checked='checked'" : "";
$this->display();
}
diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php
index c42d129dc8..576749a46a 100644
--- a/module/story/view/change.html.php
+++ b/module/story/view/change.html.php
@@ -27,7 +27,7 @@
assignedTo, 'class="form-control chosen"');?>
- story->needNotReview, '', "id='needNotReview'");?>
+ story->needNotReview, '', "id='needNotReview' {$needReview}");?>
diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php
index 6ed9a92181..2ea9485a67 100644
--- a/module/story/view/create.html.php
+++ b/module/story/view/create.html.php
@@ -93,7 +93,7 @@
| story->reviewedBy;?> |
|
- story->needNotReview, '', "id='needNotReview'" . ($projectID > 0 ? " checked='checked'" : ""));?> |
+ story->needNotReview, '', "id='needNotReview' {$needReview}");?> |
| story->mailto;?> |