backport stable branch
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 07 Aug 2009 12:12:50 +0200
changeset 2726 03e7a6efd960
parent 2722 e39982748753 (current diff)
parent 2725 6d0acd812d98 (diff)
child 2728 d4689ba782a4
backport stable branch
web/formfields.py
web/views/workflow.py
--- a/web/formfields.py	Fri Aug 07 10:43:34 2009 +0200
+++ b/web/formfields.py	Fri Aug 07 12:12:50 2009 +0200
@@ -257,7 +257,7 @@
         try:
             return req.data[self]
         except KeyError:
-            fkwargs = {}
+            fkwargs = {'eidparam': self.eidparam}
             if self.use_fckeditor(form):
                 # if fckeditor is used and format field isn't explicitly
                 # deactivated, we want an hidden field for the format
@@ -292,7 +292,8 @@
         format_field = self.get_format_field(form)
         if format_field:
             # XXX we want both fields to remain vertically aligned
-            format_field.widget.attrs['style'] = 'display: block'
+            if format_field.is_visible():
+                format_field.widget.attrs['style'] = 'display: block'
             result = format_field.render(form, renderer)
         else:
             result = u''
--- a/web/views/workflow.py	Fri Aug 07 10:43:34 2009 +0200
+++ b/web/views/workflow.py	Fri Aug 07 12:12:50 2009 +0200
@@ -62,7 +62,8 @@
             'st1': _(state.name),
             'st2': _(dest.name)}
         self.w(u'<p>%s</p>\n' % msg)
-        self.w(form.form_render(state=dest.eid, trcomment=u''))
+        self.w(form.form_render(state=dest.eid, trcomment=u'',
+                                trcomment_format=self.req.property_value('ui.default-text-format')))
 
     def redirectpath(self, entity):
         return entity.rest_path()