Explorar o código

Added condition isMultipart for the multipart enctype

Pascal Burkhard %!s(int64=14) %!d(string=hai) anos
pai
achega
c4d6bff46d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Resources/views/CRUD/base_edit.html.twig

+ 1 - 1
Resources/views/CRUD/base_edit.html.twig

@@ -23,7 +23,7 @@ file that was distributed with this source code.
 {% block side_menu %}{% if side_menu %}{{ side_menu.render|raw }}{% endif %}{% endblock %}
 {% block side_menu %}{% if side_menu %}{{ side_menu.render|raw }}{% endif %}{% endblock %}
 
 
 {% block form %}
 {% block form %}
-    <form action="{{ admin.generateUrl('update', {'id': object.id}) }}" enctype="multipart/form-data" method="POST">
+    <form action="{{ admin.generateUrl('update', {'id': object.id}) }}"{% if form.isMultipart %} enctype="multipart/form-data"{% endif %} method="POST">
 
 
         {{ form_hidden(form) }}
         {{ form_hidden(form) }}