* finish task #3748.

This commit is contained in:
wangyidong
2018-03-20 17:07:07 +08:00
parent 886153a0db
commit dfe9ca2e60
13 changed files with 359 additions and 89 deletions
+53 -12
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
@@ -27,11 +28,20 @@
</div>
</div>
<?php
$visibleFields = array();
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $this->config->bug->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<form class='form-condensed' class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-fixed table-form with-border'>
@@ -40,16 +50,44 @@ foreach(explode(',', $showFields) as $field)
<th class='w-50px'> <?php echo $lang->idAB;?></th>
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
<th class='w-120px'> <?php echo $lang->bug->module;?> <span class='required'></span></th>
<th class='w-130px<?php echo zget($visibleFields, 'project', ' hidden')?>'><?php echo $lang->bug->project;?></th>
<th class='w-130px<?php echo zget($visibleFields, 'project', ' hidden')?>'>
<?php echo $lang->bug->project;?>
<?php if(isset($requiredFields['project'])) echo " <span class='required'></span>";?>
</th>
<th><?php echo $lang->bug->openedBuild;?> <span class='required'></span></th>
<th><?php echo $lang->bug->title;?> <span class='required'></span></th>
<th class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo $lang->bug->steps;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'> <?php echo $lang->typeAB;?></th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->bug->pri;?></th>
<th class='w-80px<?php echo zget($visibleFields, 'severity', ' hidden')?>'><?php echo $lang->bug->severity;?></th>
<th class='w-120px<?php echo zget($visibleFields, 'os', ' hidden')?>'> <?php echo $lang->bug->os;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'><?php echo $lang->bug->browser;?></th>
<th class='<?php echo zget($visibleFields, 'keywords', ' hidden')?>'> <?php echo $lang->bug->keywords;?></th>
<th class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'>
<?php echo $lang->bug->deadline;?>
<?php if(isset($requiredFields['deadline'])) echo " <span class='required'></span>";?>
</th>
<th class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'>
<?php echo $lang->bug->steps;?>
<?php if(isset($requiredFields['steps'])) echo " <span class='required'></span>";?>
</th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'>
<?php echo $lang->typeAB;?>
<?php if(isset($requiredFields['type'])) echo " <span class='required'></span>";?>
</th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
<?php echo $lang->bug->pri;?>
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
</th>
<th class='w-80px<?php echo zget($visibleFields, 'severity', ' hidden')?>'>
<?php echo $lang->bug->severity;?>
<?php if(isset($requiredFields['severity'])) echo " <span class='required'></span>";?>
</th>
<th class='w-120px<?php echo zget($visibleFields, 'os', ' hidden')?>'>
<?php echo $lang->bug->os;?>
<?php if(isset($requiredFields['os'])) echo " <span class='required'></span>";?>
</th>
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'>
<?php echo $lang->bug->browser;?>
<?php if(isset($requiredFields['browser'])) echo " <span class='required'></span>";?>
</th>
<th class='<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
<?php echo $lang->bug->keywords;?>
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
</th>
</tr>
</thead>
<tbody>
@@ -89,7 +127,8 @@ foreach(explode(',', $showFields) as $field)
<?php echo html::input("title[$i]", $bugTitle, "class='form-control' autocomplete='off'") . html::hidden("uploadImage[$i]", $fileName);?>
</div>
</td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '', "class='form-control chosen'");?></td>
@@ -122,7 +161,8 @@ foreach(explode(',', $showFields) as $field)
<?php echo html::input("title[$i]", '', "class='form-control' autocomplete='off'");?>
</div>
</td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '', "class='form-control chosen'");?></td>
@@ -151,7 +191,8 @@ foreach(explode(',', $showFields) as $field)
<?php echo html::input("title[%s]", '', "class='form-control' autocomplete='off'");?>
</div>
</td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '', "class='form-control'");?></td>