Skip to content

Commit

Permalink
bug #1149 Fixed the label of autocomplete fields (javiereguiluz)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the master branch (closes #1149).

Discussion
----------

Fixed the label of autocomplete fields

This fixes #1129.

I've tried to solve this problem in a better way, but I can't. Somehow, our `label: false` setting is turned into `label: null` and I can't trace where this happens (more info here: https://github.com/javiereguiluz/EasyAdminBundle/issues/1129#issuecomment-217548679).

Commits
-------

de44029 Fixed the label of autocomplete fields
  • Loading branch information
javiereguiluz committed May 8, 2016
2 parents 73e78a7 + de44029 commit 949b24f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Resources/views/form/bootstrap_3_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,14 @@
{% endblock easyadmin_widget %}

{# EasyAdminAutocomplete form type #}
{% block easyadmin_autocomplete_widget %}
{# display the form row, but don't display its label #}
{{ form_row(form.autocomplete, { label: false, attr: attr|merge({ 'data-easyadmin-autocomplete-url' : path('easyadmin', {
{% block easyadmin_autocomplete_row %}
{# display the form widget, but don't display its label #}
{{ form_widget(form.autocomplete, { attr: attr|merge({ 'data-easyadmin-autocomplete-url' : path('easyadmin', {
action: 'autocomplete',
entity: easyadmin.entity.name,
property: easyadmin.field.fieldName,
view: easyadmin.view
})|raw })}) }}
{% endblock easyadmin_autocomplete_widget %}

{{ form_errors(form.autocomplete) }}
{% endblock easyadmin_autocomplete_row %}

0 comments on commit 949b24f

Please sign in to comment.