* Modify variable value.
This commit is contained in:
@@ -23,20 +23,20 @@
|
||||
<div class='detail-title'><?php echo $lang->execution->linkedProducts;?></div>
|
||||
<div class='detail-content row'>
|
||||
<?php $i = 0;?>
|
||||
<?php $class = $execution->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<?php $attr = $execution->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<?php foreach($allProducts as $productID => $productName):?>
|
||||
<?php if(isset($linkedProducts[$productID])):?>
|
||||
<?php foreach($linkedBranches[$productID] as $branchID):?>
|
||||
<?php $isDisabled = (in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) ? "disabled='disabled'" : '';?>
|
||||
<?php $attr .= ($attr != "disabled='disabled'" and in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) ? "disabled='disabled'" : '';?>
|
||||
<?php $title = in_array($productID, $unmodifiableProducts) ? $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="checkbox-primary" title='<?php echo $title;?>'>
|
||||
<?php echo "<input type='checkbox' name='products[$i]' value='$productID' $checked $class id='products{$productID}' $isDisabled>";?>
|
||||
<?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])) echo html::select("branch[$i]", $branchGroups[$productID], $branchID, "class='form-control chosen' $class $isDisabled");?>
|
||||
<?php if(isset($branchGroups[$productID])) echo html::select("branch[$i]", $branchGroups[$productID], $branchID, "class='form-control chosen' $attr");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($isDisabled)) echo html::hidden("products[$i]", $productID);?>
|
||||
|
||||
Reference in New Issue
Block a user