* Fix bug #17259.
This commit is contained in:
@@ -2431,6 +2431,7 @@ class execution extends control
|
||||
$this->view->unmodifiableBranches = $unmodifiableBranches;
|
||||
$this->view->linkedBranches = $linkedBranches;
|
||||
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0);
|
||||
$this->view->allBranches = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'all');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1676,12 +1676,13 @@ class executionModel extends model
|
||||
*
|
||||
* @param array $products
|
||||
* @param int $projectID
|
||||
* @param string $param
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBranchByProduct($products, $projectID = 0)
|
||||
public function getBranchByProduct($products, $projectID = 0, $param = 'noclosed')
|
||||
{
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts($products, 'noclosed');
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts($products, $param);
|
||||
|
||||
if($projectID)
|
||||
{
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
<?php $title = (in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) ? $lang->execution->notAllowRemoveProducts : $productName;?>
|
||||
<?php $checked = 'checked';?>
|
||||
<div class='col-sm-4'>
|
||||
<div class='product <?php echo $checked . (isset($branchGroups[$productID]) ? ' has-branch' : '')?>'>
|
||||
<div class='product <?php echo $checked . (isset($allBranches[$productID]) ? ' has-branch' : '')?>'>
|
||||
<div class="checkbox-primary" title='<?php echo $title;?>'>
|
||||
<?php echo "<input type='checkbox' name='products[$i]' value='$productID' $checked $attr id='products{$productID}'>";?>
|
||||
<label class='text-ellipsis checkbox-inline' for='<?php echo 'products' . $productID;?>' title='<?php echo $productName;?>'><?php echo $productName;?></label>
|
||||
</div>
|
||||
<?php if(isset($branchGroups[$productID][$branchID])) echo html::select("branch[$i]", $branchGroups[$productID], $branchID, "class='form-control chosen' disabled='disabled'");?>
|
||||
<?php if(isset($allBranches[$productID][$branchID])) echo html::select("branch[$i]", $allBranches[$productID], $branchID, "class='form-control chosen' disabled='disabled'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($attr)) echo html::hidden("products[$i]", $productID);?>
|
||||
|
||||
Reference in New Issue
Block a user