Merge branch 'sprint/208_tianshujie_58554' into 'master'
Sprint/208 tianshujie 58554 See merge request easycorp/zentaopms!4317
This commit is contained in:
@@ -4,8 +4,93 @@ $(function()
|
||||
|
||||
var $titleCol = $('#batchCreateForm table thead tr th.c-title');
|
||||
if($titleCol.width() < 150) $titleCol.width(150);
|
||||
|
||||
$('#customField').click(function()
|
||||
{
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
/* Implement a custom form without feeling refresh. */
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
fields += ',' + $(this).val();
|
||||
});
|
||||
|
||||
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchCreateFields');
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
|
||||
if($('#batchCreateForm table thead tr th.c-title').width() < 150) $titleCol.width(150);
|
||||
|
||||
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
|
||||
$('.form-actions').attr('colspan', fieldCount);
|
||||
|
||||
if(fieldCount > 10)
|
||||
{
|
||||
$('#batchCreateForm > .table-responsive').removeClass('scroll-none');
|
||||
$('#batchCreateForm > .table-responsive').css('overflow', 'auto');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#batchCreateForm > .table-responsive').addClass('scroll-none');
|
||||
$('#batchCreateForm > .table-responsive').css('overflow', 'visible');
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* Checked show fields.
|
||||
*
|
||||
* @param string fields
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkedShowFields(fields)
|
||||
{
|
||||
var fieldList = ',' + fields + ',';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var $field = $('[name^=' + $(this).val() + ']');
|
||||
var required = ',' + requiredFields + ',';
|
||||
var $fieldBox = $('.' + $(this).val() + 'Box' );
|
||||
if(fieldList.indexOf(field) >= 0 || required.indexOf(field) >= 0)
|
||||
{
|
||||
$fieldBox.removeClass('hidden');
|
||||
$field.removeAttr('disabled');
|
||||
}
|
||||
else if(!$fieldBox.hasClass('hidden'))
|
||||
{
|
||||
$fieldBox.addClass('hidden');
|
||||
$field.attr('disabled', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hidden require field.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function hiddenRequireFields()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var required = ',' + requiredFields + ',';
|
||||
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set opened builds.
|
||||
*
|
||||
|
||||
@@ -14,6 +14,24 @@
|
||||
include '../../common/view/header.html.php';
|
||||
js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
|
||||
foreach(explode(',', $config->bug->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php js::set('showFields', $showFields);?>
|
||||
<div id='mainContent' class='main-content fade'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
@@ -30,49 +48,32 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $config->bug->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form class='main-form' method='post' target='hiddenwin' id='batchCreateForm'>
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
|
||||
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox'> <?php echo $lang->product->branch;?></th>
|
||||
<th class='c-module<?php echo zget($requiredFields, 'module', '', ' required');?>'> <?php echo $lang->bug->module;?></th>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
|
||||
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?> projectBox'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
|
||||
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?> executionBox'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
|
||||
<th class='c-build required'><?php echo $lang->bug->openedBuild;?></th>
|
||||
<th class='c-title required'><?php echo $lang->bug->title;?></th>
|
||||
<?php if(isset($executionType) and $executionType == 'kanban'):?>
|
||||
<th class='c-execution'><?php echo $lang->kanbancard->region;?></th>
|
||||
<th class='c-execution'><?php echo $lang->kanbancard->lane;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->bug->deadline;?></th>
|
||||
<th class='c-steps<?php echo zget($visibleFields, 'steps', ' hidden') . zget($requiredFields, 'steps', '', ' required');?>'><?php echo $lang->bug->steps;?></th>
|
||||
<th class='c-type<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $lang->typeAB;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->bug->pri;?></th>
|
||||
<th class='c-severity<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?>'><?php echo $lang->bug->severity;?></th>
|
||||
<th class='c-os<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?>'><?php echo $lang->bug->os;?></th>
|
||||
<th class='c-browser<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?>'><?php echo $lang->bug->browser;?></th>
|
||||
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->bug->deadline;?></th>
|
||||
<th class='c-steps<?php echo zget($visibleFields, 'steps', ' hidden') . zget($requiredFields, 'steps', '', ' required');?> stepsBox'><?php echo $lang->bug->steps;?></th>
|
||||
<th class='c-type<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?> typeBox'><?php echo $lang->typeAB;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->bug->pri;?></th>
|
||||
<th class='c-severity<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?> severityBox'><?php echo $lang->bug->severity;?></th>
|
||||
<th class='c-os<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?> osBox'><?php echo $lang->bug->os;?></th>
|
||||
<th class='c-browser<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?> browserBox'><?php echo $lang->bug->browser;?></th>
|
||||
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?> keywordsBox'><?php echo $lang->bug->keywords;?></th>
|
||||
<?php
|
||||
$extendFields = $this->bug->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField)
|
||||
@@ -107,12 +108,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $i;?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, 'trunk', "class='form-control chosen' multiple");?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
@@ -132,14 +133,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
|
||||
<?php endif;?>
|
||||
<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'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
|
||||
<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>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' 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')?> priBox' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' 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')?> browserBox' 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')?> keywordsBox'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
|
||||
@@ -161,12 +162,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $i;?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='form-control chosen' multiple");?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
@@ -186,14 +187,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen' onchange='setLane(this.value, $i)'");?></td>
|
||||
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
|
||||
<?php endif;?>
|
||||
<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'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
|
||||
<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>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' 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')?> priBox' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' 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')?> browserBox' 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')?> keywordsBox'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
|
||||
@@ -203,7 +204,7 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo count($visibleFields) + 3?>' class='text-center form-actions'>
|
||||
<td colspan='<?php echo count($visibleFields) + 4?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
</td>
|
||||
@@ -217,12 +218,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>%s</td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> productBox' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
|
||||
<td><?php echo html::select("modules[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
|
||||
<td id='buildBox%s'><?php echo html::select("openedBuilds[%s][]", $builds, '', "class='form-control chosen' multiple");?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
@@ -238,14 +239,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
</div>
|
||||
</div>
|
||||
</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 chosen'");?></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, '3', "class='form-control'");?></td>
|
||||
<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>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '3', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' 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')?> browserBox' 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')?> keywordsBox'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
#formSettingForm .checkboxes {padding: 10px 3px;}
|
||||
#formSettingForm .checkbox-primary {width: 50%; float: left; margin: 3px 0;}
|
||||
#formSetting .btn {margin-right: 8px;}
|
||||
[lang^='de'] #formSetting {min-width: 360px;}
|
||||
[lang^='fr'] #formSetting {min-width: 320px;}
|
||||
</style>
|
||||
<button type="button" title="<?php echo $lang->customField;?>" class="btn btn-link" id="customField" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
|
||||
<div class="dropdown-menu pull-right" id="formSetting">
|
||||
<form class='with-padding load-indicator' id='formSettingForm' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
|
||||
<form class='with-padding load-indicator not-watch' id='formSettingForm' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
|
||||
<div><?php echo $lang->customField;?></div>
|
||||
<div class="clearfix checkboxes">
|
||||
<?php echo html::checkbox('fields', $customFields, $showFields);?>
|
||||
|
||||
@@ -676,14 +676,17 @@ class custom extends control
|
||||
$account = $this->app->user->account;
|
||||
if($this->server->request_method == 'POST')
|
||||
{
|
||||
$fields = $this->post->fields;
|
||||
$fields = $this->post->fields;
|
||||
if(is_array($fields)) $fields = join(',', $fields);
|
||||
$this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields);
|
||||
if(in_array($module, array('task', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return;
|
||||
if($module == 'bug' and $section == 'custom' and $key == 'batchCreateFields') return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadModel('setting')->deleteItems("owner=$account&module=$module§ion=$section&key=$key");
|
||||
}
|
||||
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,11 @@ select[id^="story"] + .picker-single {width: 130px; max-width: 130px;}
|
||||
.main-header .pull-left {max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
|
||||
#zeroTaskStory {margin: 0 0 0 20px; height: 32px; padding: 5px 5px 5px 5px; border-radius: 3px; border: 2px solid transparent;}
|
||||
[lang^='en'] #zeroTaskStory {max-width: 205px !important;}
|
||||
[lang^='de'] #zeroTaskStory {max-width: 220px !important;}
|
||||
[lang^='fr'] #zeroTaskStory {max-width: 265px !important;}
|
||||
#zeroTaskStory > label:before {top: 7px; left: 5px;}
|
||||
#zeroTaskStory > label:after {top: 5px; left: 5px;}
|
||||
#zeroTaskStory > label:after {top: 7px; left: 5px;}
|
||||
#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;}
|
||||
|
||||
.chosen-results > li.has-task,
|
||||
|
||||
@@ -2,9 +2,38 @@
|
||||
$(function()
|
||||
{
|
||||
removeDitto();
|
||||
if($('th.c-name').width() < 200) $('th.c-name').width(200);
|
||||
if($('th.c-name').width() < 165) $('th.c-name').width(165);
|
||||
if(taskConsumed > 0) bootbox.alert(addChildTask);
|
||||
$('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')});
|
||||
|
||||
$('#customField').click(function()
|
||||
{
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
/* Implement a custom form without feeling refresh. */
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
fields += ',' + $(this).val();
|
||||
});
|
||||
|
||||
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchCreateFields');
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
|
||||
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
|
||||
$('.form-actions').attr('colspan', fieldCount);
|
||||
|
||||
if($('th.c-name').width() < 165) $('th.c-name').width(165);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', "[name^='estStarted'], [name^='deadline']", function()
|
||||
|
||||
@@ -20,3 +20,64 @@ function setStoryModule()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checked show fields.
|
||||
*
|
||||
* @param string fields
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function checkedShowFields(fields)
|
||||
{
|
||||
var fieldList = ',' + fields + ',';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var $field = config.currentMethod == 'create' ? $('#' + $(this).val()) : $('[name^=' + $(this).val() + ']');
|
||||
var $fieldBox = $('.' + $(this).val() + 'Box' );
|
||||
if(fieldList.indexOf(field) >= 0)
|
||||
{
|
||||
$fieldBox.removeClass('hidden');
|
||||
$field.removeAttr('disabled');
|
||||
}
|
||||
else if(!$fieldBox.hasClass('hidden'))
|
||||
{
|
||||
$fieldBox.addClass('hidden');
|
||||
$field.attr('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
if(config.currentMethod == 'create');
|
||||
{
|
||||
if(fieldList.indexOf(',estStarted,') >= 0 && fieldList.indexOf(',deadline,') >= 0)
|
||||
{
|
||||
$('.borderBox').removeClass('hidden');
|
||||
}
|
||||
else if(fieldList.indexOf(',estStarted,') >= 0 || fieldList.indexOf(',deadline,') >= 0)
|
||||
{
|
||||
$('.datePlanBox').removeClass('hidden');
|
||||
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
|
||||
if(!$('.datePlanBox').hasClass('hidden')) $('.datePlanBox').addClass('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hidden require field.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function hiddenRequireFields()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var required = ',' + requiredFields + ',';
|
||||
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
$(function()
|
||||
{
|
||||
$('#customField').click(function()
|
||||
{
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
/* Implement a custom form without feeling refresh. */
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
fields += ',' + $(this).val();
|
||||
});
|
||||
|
||||
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=createFields');
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* Load module, stories and members.
|
||||
*
|
||||
|
||||
@@ -15,6 +15,26 @@
|
||||
<?php js::set('taskConsumed', $taskConsumed);?>
|
||||
<?php js::set('addChildTask', $lang->task->addChildTask);?>
|
||||
<?php js::set('isonlybody', isonlybody())?>
|
||||
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
?>
|
||||
<?php js::set('showFields', $showFields);?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="main-header clearfix">
|
||||
<h2 class="pull-left">
|
||||
@@ -40,32 +60,15 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
?>
|
||||
<form method='post' class='batch-actions-form' target='hiddenwin' enctype='multipart/form-data' id="batchCreateForm">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-form" id="tableBody">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?>'><?php echo $lang->task->module?></th>
|
||||
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?>'><?php echo $lang->task->story;?></th>
|
||||
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
|
||||
<?php if($execution->type == 'kanban'):?>
|
||||
@@ -73,12 +76,12 @@
|
||||
<th class='c-module'><?php echo $lang->kanbancard->lane;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-type required'><?php echo $lang->typeAB;?></span></th>
|
||||
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
|
||||
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?> assignedToBox'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?> estimateBox'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?> estStartedBox'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?> descBox'><?php echo $lang->task->desc;?></th>
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->task->pri;?></th>
|
||||
<?php
|
||||
$extendFields = $this->task->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField)
|
||||
@@ -112,13 +115,13 @@
|
||||
?>
|
||||
<?php $pri = 3;?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $i;?></td>
|
||||
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
|
||||
<td class='text-left'><?php echo $i;?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
</td>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
|
||||
<span class='input-group-btn'>
|
||||
@@ -146,9 +149,9 @@
|
||||
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
@@ -156,7 +159,7 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
@@ -164,8 +167,8 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
|
||||
@@ -189,11 +192,11 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='text-center'>%s</td>
|
||||
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
|
||||
<?php echo html::select("module[%s]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id, \"%s\")'")?>
|
||||
<?php echo html::hidden("parent[%s]", $parent);?>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
|
||||
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated(\"%s\")'");?>
|
||||
<span class='input-group-btn'>
|
||||
@@ -216,9 +219,9 @@
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class="form-control"');?></td>
|
||||
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("estStarted[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
@@ -226,15 +229,15 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
|
||||
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("deadline[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
|
||||
echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[%s]' id='deadlineDitto%s' checked/>{$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
|
||||
|
||||
@@ -17,9 +17,17 @@
|
||||
<?php js::set('blockID', $blockID);?>
|
||||
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
|
||||
<?php js::set('vision', $config->vision);?>
|
||||
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
|
||||
<?php if(!empty($storyID)):?>
|
||||
<style> .title-group.required > .required:after {right: 110px;}</style>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
|
||||
}
|
||||
?>
|
||||
<?php js::set('showFields', $showFields);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
@@ -29,12 +37,6 @@
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
{
|
||||
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
|
||||
}
|
||||
?>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<?php if($execution->type != 'kanban' or $this->config->vision == 'lite'):?>
|
||||
@@ -97,8 +99,8 @@
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<?php if(strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops'):?>
|
||||
<tr>
|
||||
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops') ? '' : 'hidden'?>
|
||||
<tr class="<?php echo $hiddenStory?> storyBox">
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
@@ -110,7 +112,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($execution->type != 'ops'):?>
|
||||
<tr id='testStoryBox' class='hidden'>
|
||||
<th><?php echo $lang->task->selectTestStory;?></th>
|
||||
@@ -174,8 +175,8 @@
|
||||
<a href='javascript:copyStoryTitle();' id='copyButton' class='input-control-icon-right'><?php echo $lang->task->copyStoryTitle;?></a>
|
||||
<?php echo html::hidden("storyEstimate") . html::hidden("storyDesc") . html::hidden("storyPri");?>
|
||||
</div>
|
||||
<?php if(strpos(",$showFields,", ',pri,') !== false): // begin print pri selector?>
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->pri;?></span>
|
||||
<?php $hiddenPri = strpos(",$showFields,", ',pri,') !== false ? '' : 'hidden'; // begin print pri selector?>
|
||||
<span class="input-group-addon fix-border br-0 <?php echo $hiddenPri;?> priBox"><?php echo $lang->task->pri;?></span>
|
||||
<?php
|
||||
$hasCustomPri = false;
|
||||
foreach($lang->task->priList as $priKey => $priValue)
|
||||
@@ -195,9 +196,9 @@
|
||||
}
|
||||
?>
|
||||
<?php if($hasCustomPri):?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control'");?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control $hiddenPri'");?>
|
||||
<?php else: ?>
|
||||
<div class="input-group-btn pri-selector" data-type="pri">
|
||||
<div class="input-group-btn pri-selector <?php echo $hiddenPri;?> priBox" data-type="pri">
|
||||
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
|
||||
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($task->pri) ? '0' : $task->pri?>" title="<?php echo $task->pri?>"><?php echo $task->pri?></span></span> <span class="caret"></span>
|
||||
</button>
|
||||
@@ -206,15 +207,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; // end print pri selector ?>
|
||||
<?php if(strpos(",$showFields,", ',estimate,') !== false):?>
|
||||
<div class='table-col w-120px'>
|
||||
<?php $hiddenEstimate = strpos(",$showFields,", ',estimate,') !== false ? '' : 'hidden';?>
|
||||
<div class="table-col w-120px <?php echo $hiddenEstimate;?> estimateBox">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->estimateAB;?></span>
|
||||
<input type="text" name="estimate" id="estimate" value="<?php echo $task->estimate;?>" class="form-control" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -231,29 +230,23 @@
|
||||
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false;
|
||||
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false;
|
||||
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false ? 'hidden' : '';
|
||||
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false ? 'hidden' : '';
|
||||
$hiddenDatePlan = (!$hiddenEstStarted or !$hiddenDeadline) ? '' : 'hidden';
|
||||
?>
|
||||
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
|
||||
<tr>
|
||||
<tr class="<?php echo $hiddenDatePlan?> datePlanBox">
|
||||
<th><?php echo $lang->task->datePlan;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<?php if(!$hiddenEstStarted):?>
|
||||
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
|
||||
<?php endif;?>
|
||||
<?php if(!$hiddenEstStarted and !$hiddenDeadline):?>
|
||||
<span class='input-group-addon fix-border'>~</span>
|
||||
<?php endif;?>
|
||||
<?php if(!$hiddenDeadline):?>
|
||||
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
|
||||
<?php endif;?>
|
||||
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date $hiddenEstStarted estStartedBox' placeholder='{$lang->task->estStarted}'");?>
|
||||
<?php $hiddenborder = (!$hiddenEstStarted and !$hiddenDeadline) ? '' : 'hidden';?>
|
||||
<span class="input-group-addon fix-border <?php echo $hiddenborder?> borderBox">~</span>
|
||||
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date $hiddenDeadline deadlineBox' placeholder='{$lang->task->deadline}'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(strpos(",$showFields,", ',mailto,') !== false):?>
|
||||
<tr>
|
||||
<?php $hiddenMailto = strpos(",$showFields,", ',mailto,') !== false ? '' : 'hidden';?>
|
||||
<tr class="<?php echo $hiddenMailto?> mailtoBox">
|
||||
<th><?php echo $lang->story->mailto;?></th>
|
||||
<td colspan='3'>
|
||||
<div class="input-group">
|
||||
@@ -262,7 +255,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<tr id='after-tr'>
|
||||
<th><?php echo $lang->task->afterSubmit;?></th>
|
||||
|
||||
Reference in New Issue
Block a user