* Finish task #81388.

This commit is contained in:
tanghucheng
2022-12-29 10:27:44 +08:00
parent 3a4d0a6aec
commit 237da33c90
20 changed files with 243 additions and 37 deletions
+22 -8
View File
@@ -70,7 +70,12 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
<tr>
<th><?php echo $lang->testcase->type;?></th>
<?php unset($lang->testcase->typeList['unit']);?>
<td><?php echo html::select('type', $lang->testcase->typeList, $type, "class='form-control chosen'");?></td>
<td>
<?php echo html::select('type', $lang->testcase->typeList, $type, "class='form-control chosen'");?>
<div class="input-group-addon">
<?php echo html::checkbox('auto', array('auto' => $lang->testcase->showAutoCase), '', "id='autocase' title='{$lang->testcase->showAutoCase}'");?>
</div>
</td>
<?php if(strpos(",$showFields,", 'stage') !== false):?>
<?php $hiddenStage = strpos(",$showFields,", 'stage') !== false ? '' : 'hidden';?>
<td class="<?php echo $hiddenStage?> stageBox">
@@ -81,6 +86,10 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
</td>
<?php endif;?>
</tr>
<tr class='autoScript hide'>
<th><?php echo $lang->testcase->autoScript;?></th>
<td colspan='2'><?php include './buildscriptform.php';?></td>
</tr>
<?php $hiddenStory = strpos(",$showFields,", ',story,') !== false ? '' : 'hidden';?>
<tr class="<?php echo $hiddenStory?> storyBox">
<th><?php echo $lang->testcase->lblStory;?></th>
@@ -148,16 +157,10 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
<?php if(!$this->testcase->forceNotReview()):?>
<span class="input-group-addon"><?php echo html::checkbox('forceNotReview', $lang->testcase->forceNotReview, '', "id='forceNotReview0'");?></span>
<?php endif;?>
<div class="input-group-addon">
<?php echo html::checkbox('auto', $lang->testcase->showAutoCase, '', "id='autocase' title='{$lang->testcase->showAutoCase}'");?>
</div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->testcase->autoScript;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.9&filesName=script');?></td>
</tr>
<tr>
<th><?php echo $lang->testcase->precondition;?></th>
<td colspan='2'><?php echo html::textarea('precondition', $precondition, " rows='2' class='form-control'");?></td>
@@ -274,4 +277,15 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
</div>
</div>
<?php js::set('caseModule', $lang->testcase->module)?>
<script>
$(":checkbox[name^='auto']").on('click', function(){
if($(this).attr('checked'))
{
$('.autoScript').removeClass('hide')
}else
{
$('.autoScript').addClass('hide')
}
});
</script>
<?php include '../../common/view/footer.html.php';?>