Skip to content

Commit

Permalink
Make it possible to add extra form row container attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van den Nieuwenhuisen committed Nov 25, 2020
1 parent fd2cd04 commit 481ee6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ file that was distributed with this source code.

{% block form_row %}
{% set show_label = show_label ?? true %}
<div class="form-group{% if errors|length > 0 %} has-error{% endif %}" id="sonata-ba-field-container-{{ id }}">
<div{% with {attr: row_attr|merge({id: 'sonata-ba-field-container-'~id, class: (row_attr.class|default('') ~ ' form-group' ~ ((not compound or force_error|default(false)) and not valid ? ' has-error'))|trim})} %}{{ block('attributes') }}{% endwith %}>
{% if sonata_admin.field_description.options is defined %}
{% set label = sonata_admin.field_description.options.name|default(label) %}
{% endif %}
Expand Down

0 comments on commit 481ee6a

Please sign in to comment.