Skip to content

Commit

Permalink
Simplify template based on inline standard
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 authored and greg0ire committed Mar 28, 2018
1 parent a611c22 commit fdc7ea1
Showing 1 changed file with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,20 @@ file that was distributed with this source code.
{% for nested_group_field_name, nested_group_field in form.children %}
<tr>
{% for field_name, nested_field in nested_group_field.children %}
<td class="
sonata-ba-td-{{ id }}-{{ field_name }}
control-group
{% if nested_field.vars.errors|length > 0 %} error sonata-ba-field-error{% endif %}
"
<td class="sonata-ba-td-{{ id }}-{{ field_name }} control-group"
{% if (nested_field.vars['attr']['hidden'] is defined) and (nested_field.vars['attr']['hidden']) %}
style="display:none;"
{% endif %}
>
{% if sonata_admin.field_description.associationadmin.formfielddescriptions[field_name] is defined %}
{{ form_widget(nested_field) }}

{% if associationAdmin.formfielddescriptions[field_name] is defined %}
{{ form_row(nested_field, {
'inline': 'table',
'edit': 'inline',
'label': false
}) }}
{% set dummy = nested_group_field.setrendered %}
{% else %}
{% if field_name == '_delete' %}
{{ form_widget(nested_field, { label: false }) }}
{% else %}
{{ form_widget(nested_field) }}
{% endif %}
{% endif %}
{% if nested_field.vars.errors|length > 0 %}
<div class="help-inline sonata-ba-field-error-messages">
{{ form_errors(nested_field) }}
</div>
{{ form_row(nested_field, { label: false }) }}
{% endif %}
</td>
{% endfor %}
Expand Down

0 comments on commit fdc7ea1

Please sign in to comment.