ソースを参照

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 %} >