* Finish task #54329.

This commit is contained in:
tianshujie
2022-05-19 09:57:00 +08:00
parent db940f77fd
commit 244a281a47
4 changed files with 6 additions and 8 deletions
-2
View File
@@ -1,2 +0,0 @@
insert into zt_config(vision, owner, module, `key`, value) select 'rnd', 'system', 'story', 'forceReviewUsers', `value` from zt_config where vision='rnd' and owner='system' and module='story' and `key`='forceReview';
insert into zt_config(vision, owner, module, `key`, value) select 'lite', 'system', 'story', 'forceReviewUsers', `value` from zt_config where vision='lite' and owner='system' and module='story' and `key`='forceReview';
+2 -2
View File
@@ -77,7 +77,7 @@ class custom extends control
{
$this->view->depts = $this->loadModel('dept')->getDeptPairs();
$this->view->forceReviewAll = zget($this->config->$module, 'forceReviewAll', 'false');
$this->view->forceReviewUsers = zget($this->config->$module, 'forceReviewUsers', '');
$this->view->forceReview = zget($this->config->$module, 'forceReview', '');
$this->view->forceReviewRoles = zget($this->config->$module, 'forceReviewRoles', '');
$this->view->forceReviewDepts = zget($this->config->$module, 'forceReviewDepts', '');
}
@@ -126,7 +126,7 @@ class custom extends control
$data = fixer::input('post')
->setDefault('forceReviewAll', 0)
->setDefault('forceReviewDepts', '')
->join('forceReviewUsers', ',')
->join('forceReview', ',')
->join('forceReviewRoles', ',')
->join('forceReviewDepts', ',')
->join('forceReviewAll', ',')
+3 -3
View File
@@ -112,7 +112,7 @@ EOT;
</tr>
<tr id='userBox'>
<th><?php echo $lang->custom->forceReview . $space . $lang->custom->account;?></th>
<td><?php echo html::select('forceReviewUsers[]', $users, $forceReviewUsers, "class='form-control chosen' multiple");?></td>
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
<td>
<?php echo html::checkbox('forceReviewAll', array('1' => $lang->custom->allUsers), $forceReviewAll);?>
<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->custom->notice->selectAllTip;?>"></icon>
@@ -290,11 +290,11 @@ $(function()
$('#deptBox').toggleClass('hidden', checked);
if(checked)
{
$('#forceReviewUsers').val('').attr('disabled', 'disabled').trigger('chosen:updated');
$('#forceReview').val('').attr('disabled', 'disabled').trigger('chosen:updated');
}
else
{
$('#forceReviewUsers').removeAttr('disabled', 'disabled').trigger('chosen:updated');
$('#forceReview').removeAttr('disabled', 'disabled').trigger('chosen:updated');
}
}
})
+1 -1
View File
@@ -4323,7 +4323,7 @@ class storyModel extends model
if(isset($this->config->story->forceReviewAll) and $this->config->story->forceReviewAll) return true;
$forceUsers = '';
if(!empty($this->config->story->forceReviewUsers)) $forceUsers = $this->config->story->forceReviewUsers;
if(!empty($this->config->story->forceReview)) $forceUsers = $this->config->story->forceReview;
if(!empty($this->config->story->forceReviewRoles) or !empty($this->config->story->forceReviewDepts))
{