|
@@ -12,7 +12,7 @@
|
|
|
>
|
|
|
<?php if (count($field->getPreferredChoices()) > 0): ?>
|
|
|
<?php foreach ($field->getPreferredChoices() as $choice => $label): ?>
|
|
|
- <?php if ($label instanceof \Traversable): ?>
|
|
|
+ <?php if ($field->isChoiceGroup($label)): ?>
|
|
|
<optgroup label="<?php echo $choice ?>">
|
|
|
<?php foreach ($label as $nestedChoice => $nestedLabel): ?>
|
|
|
<option value="<?php echo $nestedChoice ?>"<?php if ($field->isChoiceSelected($nestedChoice)): ?> selected="selected"<?php endif?>>
|
|
@@ -29,7 +29,7 @@
|
|
|
<option disabled="disabled"><?php echo isset($separator) ? $separator : '-----------------' ?></option>
|
|
|
<?php endif ?>
|
|
|
<?php foreach ($field->getOtherChoices() as $choice => $label): ?>
|
|
|
- <?php if ($label instanceof \Traversable): ?>
|
|
|
+ <?php if ($field->isChoiceGroup($label)): ?>
|
|
|
<optgroup label="<?php echo $choice ?>">
|
|
|
<?php foreach ($label as $nestedChoice => $nestedLabel): ?>
|
|
|
<option value="<?php echo $nestedChoice ?>"<?php if ($field->isChoiceSelected($nestedChoice)): ?> selected="selected"<?php endif?>>
|