Skip to content

Commit

Permalink
Add support for symfony form help
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Feb 9, 2020
1 parent 02f7b10 commit 77326c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ file that was distributed with this source code.
{% endapply %}
{% endblock %}

{% block form_help %}
{% apply spaceless %}
<span class="help-block sonata-ba-field-widget-help">{{ parent() }}</span>
{% endapply %}
{% endblock %}

{% block form_widget -%}
{{ parent() }}
{{ block('sonata_help') }}
Expand Down Expand Up @@ -395,6 +401,8 @@ file that was distributed with this source code.
{% if sonata_admin is defined and sonata_admin_enabled and sonata_admin.field_description.help|default(false) %}
<span class="help-block sonata-ba-field-help">{{ sonata_admin.field_description.help|trans({}, sonata_admin.field_description.translationDomain ?: admin.translationDomain)|raw }}</span>
{% endif %}

{{ form_help(form) }}
</div>
</div>
{% endblock form_row %}
Expand Down

0 comments on commit 77326c4

Please sign in to comment.