* Fix bug #42167.
This commit is contained in:
@@ -800,7 +800,7 @@ class project extends control
|
||||
$this->view->allProducts = array('0' => '') + $allProducts;
|
||||
$this->view->multiBranchProducts = $this->loadModel('product')->getMultiBranchPairs();
|
||||
$this->view->productPlans = array_filter($productPlansOrder);
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
$this->view->linkedProducts = $linkedProducts ? $linkedProducts : array('' => '');
|
||||
$this->view->branches = $branches;
|
||||
$this->view->executions = $this->execution->getPairs($projectID);
|
||||
$this->view->unmodifiableProducts = $unmodifiableProducts;
|
||||
|
||||
@@ -156,17 +156,19 @@
|
||||
<div class="col-sm-6">
|
||||
<div class='table-row'>
|
||||
<div class='table-col'>
|
||||
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
|
||||
<?php $hasBranch = !empty($product) && $product->type != 'normal' and isset($branchGroups[$product->id]);?>
|
||||
<div class='input-group <?php if($hasBranch) echo ' has-branch';?>'>
|
||||
<span class='input-group-addon'><?php echo $lang->productCommon;?></span>
|
||||
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?>
|
||||
<?php $productID = !empty($product) ? $product->id : '';?>
|
||||
<?php $productType = !empty($product) ? $product->type : '';?>
|
||||
<?php echo html::select("products[$i]", $allProducts, $productID, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $productID . "' data-type='" . $productType . "'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-col <?php if(!$hasBranch) echo 'hidden';?>'>
|
||||
<div class='input-group required'>
|
||||
<span class='input-group-addon fix-border'><?php echo $lang->product->branchName['branch'];?></span>
|
||||
<?php $branchIdList = join(',', $product->branches);?>
|
||||
<?php echo html::select("branch[$i][]", isset($branchGroups[$product->id]) ? $branchGroups[$product->id] : array(), $branchIdList, "class='form-control chosen' multiple onchange=\"loadPlans('#products{$i}', this)\"");?>
|
||||
<?php $branchIdList = !empty($product) ? join(',', $product->branches) : '';?>
|
||||
<?php echo html::select("branch[$i][]", isset($branchGroups[$productID]) ? $branchGroups[$productID] : array(), $branchIdList, "class='form-control chosen' multiple onchange=\"loadPlans('#products{$i}', this)\"");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -174,7 +176,7 @@
|
||||
<div class="col-sm-6">
|
||||
<div class='input-group' <?php echo "id='plan$i'";?>>
|
||||
<span class='input-group-addon'><?php echo $lang->product->plan;?></span>
|
||||
<?php echo html::select("plans[$product->id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), $product->plans, "class='form-control chosen' multiple");?>
|
||||
<?php echo html::select("plans[$productID][]", isset($productPlans[$productID]) ? $productPlans[$productID] : array(), !empty($product) ? $product->plans : '', "class='form-control chosen' multiple");?>
|
||||
<div class='input-group-btn'>
|
||||
<a href='javascript:;' onclick='addNewLine(this)' class='btn btn-link addLine'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='removeLine(this)' class='btn btn-link removeLine' <?php if($i == 0) echo "style='visibility: hidden'";?>><i class='icon-close'></i></a>
|
||||
|
||||
Reference in New Issue
Block a user