* bugUI: modify common field settings.
This commit is contained in:
@@ -5,23 +5,20 @@ global $lang;
|
||||
$fields = defineFieldList('bug');
|
||||
|
||||
$fields->field('product')
|
||||
->required()
|
||||
->items(data('products'))
|
||||
->value(data('bug.productID'));
|
||||
|
||||
$fields->field('branch')
|
||||
->items(data('branchs'))
|
||||
->value(data('bug.branch'));
|
||||
->hidden(data('product.shadow'))
|
||||
->control('inputGroup')
|
||||
->items(false)
|
||||
->itemBegin('product')->control('picker')->items(data('products'))->value(data('bug.productID'))->itemEnd()
|
||||
->item((data('product.type') !== 'normal' && isset(data('products')[data('bug.productID')])) ? field('branch')->control('picker')->boxClass('flex-none')->width('100px')->name('branch')->items(data('branches'))->value(data('bug.branch')) : null);
|
||||
|
||||
$fields->field('module')
|
||||
->controlBegin('module')
|
||||
->type('modulePicker')
|
||||
->control('modulePicker')
|
||||
->items(data('moduleOptionMenu'))
|
||||
->value(data('bug.moduleID'))
|
||||
->manageLink(createLink('tree', 'browse', 'rootID=' . data('bug.productID') . '&view=bug¤tModuleID=0&branch=' . data('bug.branch')))
|
||||
->controlEnd();
|
||||
->manageLink(createLink('tree', 'browse', 'rootID=' . data('bug.productID') . '&view=bug¤tModuleID=0&branch=' . data('bug.branch')));
|
||||
|
||||
$fields->field('openedBuild')
|
||||
->checkbox(array('text' => $lang->bug->allBugs, 'name' => 'allBuilds'))
|
||||
->control('inputGroup')
|
||||
->itemBegin('openedBuild[]')->control('picker')->items(data('builds'))->multiple()->itemEnd()
|
||||
->itemBegin()->control('addon')->id('buildBoxActions')->className('btn-group hidden')->itemEnd()
|
||||
@@ -35,14 +32,27 @@ $fields->field('assignedTo')
|
||||
$fields->field('deadline')
|
||||
->control('datePicker');
|
||||
|
||||
$fields->field('title')
|
||||
->width('full');
|
||||
if(isset($executionType) and $executionType == 'kanban')
|
||||
{
|
||||
$fields->field('region')
|
||||
->label($lang->kanbancard->region)
|
||||
->control('picker')
|
||||
->items(data('regionPairs'))
|
||||
->value(data('regionID'));
|
||||
|
||||
$fields->field('color')
|
||||
->control('color');
|
||||
$fields->field('lane')
|
||||
->label($lang->kanbancard->lane)
|
||||
->control('picker')
|
||||
->items(data('lanePairs'))
|
||||
->value(data('laneID'));
|
||||
}
|
||||
|
||||
$fields->field('title')
|
||||
->control('colorInput', array('colorValue' => data('bug.color')));
|
||||
|
||||
$fields->field('type')
|
||||
->width('1/6')
|
||||
->control('picker')
|
||||
->items($lang->bug->typeList);
|
||||
|
||||
$fields->field('severity')
|
||||
@@ -65,37 +75,39 @@ $fields->field('files')
|
||||
|
||||
$fields->field('project')
|
||||
->foldable()
|
||||
->control('picker')
|
||||
->items(data('projects'))
|
||||
->value(data('projectID'));
|
||||
|
||||
$fields->field('execution')
|
||||
->hidden(data('execution') && !data('execution.multiple'))
|
||||
->id('executionBox')
|
||||
->foldable()
|
||||
->label(data('bug.projectModel') === 'kanban' ? $lang->bug->kanban : $lang->bug->execution)
|
||||
->control('picker')
|
||||
->items(data('executions'))
|
||||
->value(data('executionID'));
|
||||
|
||||
$fields->field('story')
|
||||
->wrapBefore()
|
||||
->foldable()
|
||||
->control('picker')
|
||||
->items(empty(data('bug.stories')) ? array() : data('bug.stories'))
|
||||
->value(data('bug.storyID'));
|
||||
|
||||
$fields->field('task')
|
||||
->foldable()
|
||||
->control('picker')
|
||||
->items(array())
|
||||
->value(data('bug.taskID'));
|
||||
|
||||
$fields->field('feedbackBy')
|
||||
->foldable();
|
||||
->foldable()
|
||||
->control('input');
|
||||
|
||||
$fields->field('notifyEmail')
|
||||
->foldable();
|
||||
|
||||
$fields->field('os')
|
||||
->foldable()
|
||||
->control('picker')
|
||||
->items($lang->bug->osList)
|
||||
->multiple();
|
||||
->control('input');
|
||||
|
||||
$fields->field('browser')
|
||||
->foldable()
|
||||
@@ -103,24 +115,22 @@ $fields->field('browser')
|
||||
->items($lang->bug->browserList)
|
||||
->multiple();
|
||||
|
||||
$fields->field('os')
|
||||
->foldable()
|
||||
->control('picker')
|
||||
->items($lang->bug->osList)
|
||||
->multiple();
|
||||
|
||||
$fields->field('mailto')
|
||||
->foldable()
|
||||
->control('mailto')
|
||||
->value(data('bug.mailto'));
|
||||
|
||||
$fields->field('keywords');
|
||||
$fields->field('keywords')
|
||||
->foldable()
|
||||
->control('input');
|
||||
|
||||
$fields->field('case')->control('hidden')->value(data('bug.caseID'));
|
||||
$fields->field('caseVersion')->control('hidden')->value(data('bug.version'));
|
||||
$fields->field('result')->control('hidden')->value(data('bug.runID'));
|
||||
$fields->field('testtask')->control('hidden')->value(data('bug.testtask'));
|
||||
|
||||
$fields = defineFieldList('bug.kanban');
|
||||
$fields->field('region')
|
||||
->label(data('lang.kanbancard.region'))
|
||||
->items(data('regionPairs'))
|
||||
->value(data('regionID'));
|
||||
$fields->field('lane')
|
||||
->label(data('lang.kanbancard.lane'))
|
||||
->items(data('lanePairs'))
|
||||
->value(data('laneID'));
|
||||
|
||||
@@ -3,15 +3,8 @@ namespace zin;
|
||||
|
||||
global $lang;
|
||||
|
||||
$fields = defineFieldList('bug.create', 'bug', '!branch,color');
|
||||
$fields = defineFieldList('bug.create', 'bug');
|
||||
|
||||
$fields->field('product')
|
||||
->hidden(data('product.shadow'))
|
||||
->control('inputGroup')
|
||||
->items(false)
|
||||
->itemBegin('product')->control('picker')->items(data('products'))->value(data('bug.productID'))->itemEnd()
|
||||
->item((data('product.type') !== 'normal' && isset(data('products')[data('bug.productID')])) ? field('branch')->control('picker')->boxClass('flex-none')->width('100px')->name('branch')->items(data('branches'))->value(data('bug.branch')) : null);
|
||||
$fields->field('module')->width('1/4');
|
||||
|
||||
$fields->field('title')
|
||||
->width('full')
|
||||
->control('colorInput', array('colorValue' => data('bug.color')));
|
||||
$fields->field('openedBuild')->width('1/4');
|
||||
|
||||
Reference in New Issue
Block a user