Finish task#2986 调整测试用例的评审功能,cost:1 left:0
This commit is contained in:
@@ -69,7 +69,7 @@ EOT;
|
||||
<td><?php echo html::radio('needReview', $lang->custom->reviewList, $needReview);?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr <?php if($needReview and $module == 'testcase') echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->custom->forceReview;?></th>
|
||||
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
|
||||
<td class='w-180px'><?php printf($lang->custom->notice->forceReview, $lang->$module->common);?></td>
|
||||
@@ -160,4 +160,22 @@ EOT;
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php if($module == 'testcase' and $field == 'review'):?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$("input[name='needReview']").change(function()
|
||||
{
|
||||
if($(this).val() == 0)
|
||||
{
|
||||
$('#forceReview').closest('tr').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#forceReview').closest('tr').addClass('hidden');
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1352,12 +1352,11 @@ class testcaseModel extends model
|
||||
* Check whether force review
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function forceReview()
|
||||
{
|
||||
if(!$this->config->testcase->needReview) return false;
|
||||
if(empty($this->config->testcase->forceReview)) return true;
|
||||
if($this->config->testcase->needReview) return true;
|
||||
if(strpos(",{$this->config->testcase->forceReview},", ",{$this->app->user->account},") !== false) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user