web/data/cubicweb.edition.js
branch3.5
changeset 3136 ed303cf3a048
parent 3100 b0a583156d6d
parent 3124 c929360212ca
child 3232 eccb7380dc3b
--- a/web/data/cubicweb.edition.js	Wed Sep 09 14:38:50 2009 +0200
+++ b/web/data/cubicweb.edition.js	Wed Sep 09 15:07:58 2009 +0200
@@ -255,6 +255,11 @@
         updateInlinedEntitiesCounters(rtype);
         reorderTabindex();
         form.trigger('inlinedform-added');
+        // if the inlined form contains a file input, we must force
+        // the form enctype to multipart/form-data
+        if (form.find('input:file').length) {
+            form.closest('form').attr('enctype', 'multipart/form-data');
+        }
         postAjaxLoad(dom);
     });
     d.addErrback(function (xxx) {