Skip to content

Commit

Permalink
Merge branch 'feat-2.7-choice-attr' of git://github.com/Maff-/bootstr…
Browse files Browse the repository at this point in the history
…ap-bundle into Maff--feat-2.7-choice-attr

* 'feat-2.7-choice-attr' of git://github.com/Maff-/bootstrap-bundle:
  Render option attr of collapsed choice types
  • Loading branch information
Florian Eckerstorfer committed Apr 29, 2016
2 parents adfcf74 + 381a352 commit 1490682
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Resources/views/Form/bootstrap.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,13 @@
{{ block('choice_widget_options') }}
</optgroup>
{% else %}
<option value="{{ choice.value }}"{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is defined ? (choice_translation_domain is same as (false) ? choice.label : choice.label|trans({}, choice_translation_domain)) : choice.label|trans({}, translation_domain) }}</option>
{% set id = null %}
{% set attr = (attribute(choice, 'attr') is defined) ? choice.attr : [] %}
<option value="{{ choice.value }}"
{% if choice is selectedchoice(value) %} selected="selected"{% endif %}
{{ block('widget_container_attributes') }}>
{{ choice_translation_domain is defined ? (choice_translation_domain is same as (false) ? choice.label : choice.label|trans({}, choice_translation_domain)) : choice.label|trans({}, translation_domain) }}
</option>
{% endif %}
{% endfor %}
{% endspaceless %}
Expand Down

0 comments on commit 1490682

Please sign in to comment.