Skip to content

Commit

Permalink
Merge pull request sonata-project#1581 from tiagojsag/empty_value_tra…
Browse files Browse the repository at this point in the history
…nslation

empty_value translation
  • Loading branch information
rande committed Aug 23, 2013
2 parents d15d9fa + b16a856 commit d8350df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ file that was distributed with this source code.
{% else %}
<select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
{% if empty_value is not none %}
<option value="">{{ empty_value|trans }}</option>
<option value="">
{% if not sonata_admin.admin %}
{{- empty_value|trans({}, translation_domain) -}}
{% else %}
{{- empty_value|trans({}, sonata_admin.field_description.translationDomain) -}}
{% endif%}
</option>
{% endif %}
{% if preferred_choices|length > 0 %}
{% set options = preferred_choices %}
Expand Down

0 comments on commit d8350df

Please sign in to comment.