sprint_sunjun_55259

This commit is contained in:
sunjun
2022-05-25 01:34:10 +00:00
parent b072234b4d
commit ca20a35a26
4 changed files with 32 additions and 9 deletions
+19
View File
@@ -807,3 +807,22 @@ function setBranchRelated(branchID, productID, num)
});
}
}
$(document).ready(function()
{
$('#customField').click(function()
{
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var required = ',' + requiredFields + ',';
if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled');
});
});
$('#formSettingForm .btn-primary').click(function()
{
$('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled');
});
});
+11 -8
View File
@@ -10,7 +10,10 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php
include '../../common/view/header.html.php';
js::set('requiredFields', $config->bug->create->requiredFields);
?>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2>
@@ -69,7 +72,7 @@
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
<?php
$extendFields = $this->bug->getFlowExtendFields();
foreach($extendFields as $extendField)
foreach($extendFields as $extendField)
{
$required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : '';
echo "<th class='c-extend $required'>{$extendField->name}</th>";
@@ -129,9 +132,9 @@
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<?php
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField)
foreach($extendFields as $extendField)
{
$object = new stdclass();
$object->{$extendField->field} = $extendField->default;
@@ -184,9 +187,9 @@
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<?php
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField)
foreach($extendFields as $extendField)
{
$object = new stdclass();
$object->{$extendField->field} = $extendField->default;
@@ -238,9 +241,9 @@
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[%s]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
<?php
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField)
foreach($extendFields as $extendField)
{
$object = new stdclass();
$object->{$extendField->field} = $extendField->default;
+1
View File
@@ -27,6 +27,7 @@ js::set('oldProjectID', $projectID);
js::set('blockID', $blockID);
js::set('moduleID', $moduleID);
js::set('tab', $this->app->tab);
js::set('requiredFields', $config->bug->create->requiredFields);
if($this->app->tab == 'execution') js::set('objectID', $executionID);
if($this->app->tab == 'project') js::set('objectID', $projectID);
?>
+1 -1
View File
@@ -53,7 +53,7 @@ $config->custom->fieldList['task']['edit'] = 'module,pri,estimate,estS
$config->custom->fieldList['task']['finish'] = 'comment';
$config->custom->fieldList['task']['activate'] = 'assignedTo,comment';
$config->custom->fieldList['build'] = 'scmPath,filePath,desc';
$config->custom->fieldList['bug']['create'] = 'module,project,deadline,type,os,browser,severity,pri,steps,keywords';
$config->custom->fieldList['bug']['create'] = 'module,project,execution,deadline,type,os,browser,severity,pri,steps,keywords';
$config->custom->fieldList['bug']['edit'] = 'plan,project,assignedTo,deadline,type,os,browser,severity,pri,steps,keywords';
$config->custom->fieldList['bug']['resolve'] = 'resolvedBuild,resolvedDate,assignedTo,comment';
$config->custom->fieldList['testcase']['create'] = 'stage,story,pri,precondition,keywords,module';