[autoform] Ease overriding of inlined form renderer. Closes #15755515
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 12 Oct 2016 10:59:18 +0200
changeset 11731 6563113b9caf
parent 11730 6f303125bfc8
child 11732 45c38bd3e96d
[autoform] Ease overriding of inlined form renderer. Closes #15755515
cubicweb/web/views/autoform.py
--- a/cubicweb/web/views/autoform.py	Wed Oct 19 15:58:30 2016 +0200
+++ b/cubicweb/web/views/autoform.py	Wed Oct 12 10:59:18 2016 +0200
@@ -200,6 +200,7 @@
 
     _select_attrs = ('peid', 'rtype', 'role', 'pform', 'etype')
     removejs = "removeInlinedEntity('%s', '%s', '%s')"
+    form_renderer_id = 'inline'
 
     # make pylint happy
     peid = rtype = role = pform = etype = None
@@ -229,7 +230,7 @@
         form = self._cw.vreg['forms'].select('edition', self._cw,
                                              entity=entity,
                                              formtype='inlined',
-                                             form_renderer_id='inline',
+                                             form_renderer_id=self.form_renderer_id,
                                              copy_nav_params=False,
                                              mainform=False,
                                              parent_form=self.pform,