* Code for task #87176.

This commit is contained in:
tanghucheng
2023-03-15 13:51:12 +08:00
parent cfcd6c37b6
commit 8a3538fd6c
2 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -69,19 +69,19 @@ class custom extends control
$this->view->unitList = explode(',', $unitList);
$this->view->defaultCurrency = zget($this->config->$module, 'defaultCurrency', 'CNY');
}
if($module == 'story' and $field == 'reviewRules')
if(($module == 'story' or $module == 'demand') and $field == 'reviewRules')
{
$this->app->loadConfig($module);
$this->view->reviewRule = zget($this->config->$module, 'reviewRules', '1');
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->view->superReviewers = zget($this->config->$module, 'superReviewers', '');
}
if(($module == 'story' or $module == 'testcase') and $field == 'review')
if(($module == 'story' or $module == 'testcase' or $module == 'demand') and $field == 'review')
{
$this->app->loadConfig($module);
$this->loadModel('user');
if($module == 'story')
if($module == 'story' or $module == 'demand')
{
$this->view->depts = $this->loadModel('dept')->getDeptPairs();
@@ -139,7 +139,7 @@ class custom extends control
if(empty($data->defaultCurrency)) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->defaultNotEmpty));
$this->loadModel('setting')->setItems("system.$module", $data);
}
elseif($module == 'story' and $field == 'review')
elseif(($module == 'story' or $module == 'demand') and $field == 'review')
{
$data = fixer::input('post')
->setDefault('forceReview', '')
@@ -165,7 +165,7 @@ class custom extends control
$this->loadModel('setting')->setItems("system.$module@{$this->config->vision}", $data);
}
elseif($module == 'story' and $field == 'reviewRules')
elseif(($module == 'story' or $module == 'demand') and $field == 'reviewRules')
{
$data = fixer::input('post')->setDefault('superReviewers', '')->join('superReviewers', ',')->get();
$this->loadModel('setting')->setItems("system.$module@{$this->config->vision}", $data);
+4 -4
View File
@@ -72,7 +72,7 @@ EOT;
<td colspan='4' class='text-center'><?php echo html::submitButton();?></td>
</tr>
</table>
<?php elseif($module == 'story' and $field == 'reviewRules'):?>
<?php elseif(in_array($module, array('story', 'demand')) and $field == 'reviewRules'):?>
<table class='table table-form mw-700px'>
<tr>
<th class='thWidth'><?php echo $lang->custom->reviewRule;?></th>
@@ -87,13 +87,13 @@ EOT;
<td colspan='2' class='text-center'><?php echo html::submitButton();?></td>
</tr>
</table>
<?php elseif(($module == 'story' or $module == 'testcase') and $field == 'review'):?>
<?php elseif(in_array($module, array('story', 'testcase', 'demand')) and $field == 'review'):?>
<table class='table table-form'>
<tr class='reviewBox'>
<th class='thWidth'><?php echo $lang->custom->storyReview;?></th>
<td><?php echo html::radio('needReview', $lang->custom->reviewList, $needReview);?></td>
</tr>
<?php if($module == 'story'):?>
<?php if($module == 'story' or $module == 'demand'):?>
<tr>
<?php $space = ($app->getClientLang() != 'zh-cn' and $app->getClientLang() != 'zh-tw') ? ' ': '';?>
<td colspan='3' class='storyReviewTip<?php if($needReview) echo " hidden"?>'><div><?php echo sprintf($lang->custom->notice->forceReview, $lang->$module->common) . $lang->custom->notice->storyReviewTip;?></td>
@@ -249,7 +249,7 @@ EOT;
</form>
</div>
</div>
<?php if($module == 'story' and $field == 'review'):?>
<?php if(in_array($module, array('story', 'demand')) and $field == 'review'):?>
<script>
$(function()
{