Skip to content

Commit

Permalink
fixed bug, custom dropdown selects were not displaying if selectGroup…
Browse files Browse the repository at this point in the history
… != 'custom'
  • Loading branch information
cnizzardini committed Sep 12, 2019
1 parent 23e51e1 commit 30cd8e3
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions src/Template/Element/YummySearch/basic-form.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,31 @@ while($i < $length);
<?php echo $this->Form->button('Search', ['class' => 'btn btn-info btn-fill', 'value' => 1]); ?>
<?php echo $this->Html->link('Clear', $YummySearch['base_url'], ['class' => 'btn btn-info']); ?>
<?php
foreach ($YummySearch['models'] as $model) {
foreach($model as $column) {

if (empty($column['data-items'])) {
continue;
}
$columns = [];

echo $this->Form->select('YummySearchHidden.' . $column['value'], $column['data-items'], [
'class' => $hidden,
'id' => '',
'label' => false,
'default' => $search,
'style' => empty($hidden) ? 'display:none' : ''
]);
}
foreach ($YummySearch['models'] as $key => $model) {
if (is_numeric($key)) {
$columns[] = $model;
} else {
$columns = array_merge($columns, $model);
}
}

foreach($columns as $column) {

if (empty($column['data-items'])) {
continue;
}

echo $this->Form->select('YummySearchHidden.' . $column['value'], $column['data-items'], [
'class' => $hidden,
'id' => '',
'label' => false,
'default' => $search,
'style' => empty($hidden) ? 'display:none' : ''
]);
}
?>
</div>
</div>
Expand Down

0 comments on commit 30cd8e3

Please sign in to comment.