File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Bridge/Twig/Resources/views/Form
Bundle/FrameworkBundle/Resources/views/Form Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 57
57
{% if preferred_choices | length > 0 %}
58
58
{% set options = preferred_choices %}
59
59
{{ block (' widget_choice_options' ) }}
60
- <option disabled =" disabled" >{{ separator }}</option >
60
+ {% if choices | length > 0 %}
61
+ <option disabled =" disabled" >{{ separator }}</option >
62
+ {% endif %}
61
63
{% endif %}
62
64
{% set options = choices %}
63
65
{{ block (' widget_choice_options' ) }}
Original file line number Diff line number Diff line change 13
13
<?php if (null !== $ empty_value ): ?> <option value=""><?php echo $ view ->escape ($ view ['translator ' ]->trans ($ empty_value )) ?> </option><?php endif ; ?>
14
14
<?php if (count ($ preferred_choices ) > 0 ): ?>
15
15
<?php echo $ view ['form ' ]->renderBlock ('choice_options ' , array ('options ' => $ preferred_choices )) ?>
16
- <option disabled="disabled"><?php echo $ separator ?> </option>
16
+ <?php if (count ($ choices ) > 0 ): ?>
17
+ <option disabled="disabled"><?php echo $ separator ?> </option>
18
+ <?php endif ?>
17
19
<?php endif ?>
18
20
<?php echo $ view ['form ' ]->renderBlock ('choice_options ' , array ('options ' => $ choices )) ?>
19
21
</select>
You can’t perform that action at this time.
0 commit comments