diff -r 7dfccf5612ed -r 99c0b55892d6 web/views/autoform.py --- a/web/views/autoform.py Mon Sep 21 12:52:44 2009 +0200 +++ b/web/views/autoform.py Mon Sep 21 15:33:46 2009 +0200 @@ -319,6 +319,33 @@ """ return card in '1?' + @property + def form_needs_multipart(self): + """true if the form needs enctype=multipart/form-data""" + if super(AutomaticEntityForm, self).form_needs_multipart: + return True + # take a look at inlined forms to check (recursively) if they + # need multipart handling. + # XXX: this is very suboptimal because inlined forms will be + # selected / instantiated twice : here and during form rendering. + # Potential solutions: + # -> use subforms for inlined forms to get easiser access + # -> use a simple onload js function to check if there is + # a input type=file in the form + # -> generate the