Selaa lähdekoodia

Fix label on one-to-many template

Thomas Rabaix 13 vuotta sitten
vanhempi
commit
3c8410cbee
1 muutettua tiedostoa jossa 1 lisäystä ja 5 poistoa
  1. 1 5
      Resources/views/CRUD/edit_orm_one_to_many.html.twig

+ 1 - 5
Resources/views/CRUD/edit_orm_one_to_many.html.twig

@@ -25,11 +25,7 @@ file that was distributed with this source code.
                                         {% if field_name == '_delete' %}
                                             <th>{% trans from 'SonataAdminBundle' %}action_delete{% endtrans %}</th>
                                         {% else %}
-                                            {% if nested_field.get('sonata_admin').field_description.options.name is defined %}
-                                                <th>{{ nested_field.get('sonata_admin').field_description.options.name }}</th>
-                                            {% else %}
-                                                <th>{{ field_name|trans }}</th>
-                                            {% endif %}
+                                            <th>{{ nested_field.get('sonata_admin').admin.trans(nested_field.vars.label) }}</th>
                                         {% endif %}
                                     {% endfor %}
                                 </tr>