Skip to content

Commit

Permalink
Remove buggy option groups feature
Browse files Browse the repository at this point in the history
  • Loading branch information
bytehead committed Jan 17, 2022
1 parent f2984b7 commit 496e90a
Showing 1 changed file with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private function getOptions(string $index): array
{
$options = array();

foreach ($this->arrOptions as $key => $option)
foreach ($this->arrOptions as $option)
{
$option['index'] = $index;

Expand All @@ -81,26 +81,6 @@ private function getOptions(string $index): array
$option['label']
);
}
else
{
$optionGroups = array();

foreach ($option as $optionGroup)
{
$optionGroups[] = sprintf(
'<option value="%s"%s>%s</option>',
StringUtil::specialchars($optionGroup['value']),
$this->isSelected($optionGroup),
$optionGroup['label']
);
}

$options[] = sprintf(
'<optgroup label="&nbsp;%s">%s</optgroup>',
StringUtil::specialchars($key),
implode('', $optionGroups)
);
}
}

return $options;
Expand Down

0 comments on commit 496e90a

Please sign in to comment.