web/data/cubicweb.edition.js
branchstable
changeset 3124 c929360212ca
parent 2859 822258915ff0
child 3136 ed303cf3a048
--- a/web/data/cubicweb.edition.js	Tue Sep 08 15:58:47 2009 +0200
+++ b/web/data/cubicweb.edition.js	Tue Sep 08 21:57:45 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) {