fix: editing an attribute was not setting the distribution level to the

previous value.
pull/3188/head
Sami Mokaddem 2018-04-24 14:45:24 +00:00
parent 42a5aaf5e6
commit 890cd733ed
1 changed files with 8 additions and 4 deletions

View File

@ -31,12 +31,16 @@
?>
<div class="input clear"></div>
<?php
echo $this->Form->input('distribution', array(
$distArray = array(
'options' => array($distributionLevels),
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
'selected' => $initialDistribution,
));
);
if ($action == 'add') {
$distArray['selected'] = $initialDistribution;
}
echo $this->Form->input('distribution', $distArray);
?>
<div id="SGContainer" style="display:none;">
<?php