فهرست منبع

Added check if sortable variable is defined in form_admin_fields.html.twig

This fixes edge case if someone is using overloaded choice type in his project without changes in template.
Andrej Hudec 10 سال پیش
والد
کامیت
381c376e21
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      Resources/views/Form/form_admin_fields.html.twig

+ 1 - 1
Resources/views/Form/form_admin_fields.html.twig

@@ -155,7 +155,7 @@ file that was distributed with this source code.
         {% set required = false %}
     {% endif %}
     {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
-    {% if sortable and multiple %}
+    {% if (sortable is defined) and sortable and multiple %}
         {{ block('sonata_type_choice_multiple_sortable') }}
     {% else %}
         <select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %} >