Enhance display of the security view
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 22 Feb 2017 22:26:12 +0100
changeset 136 44f2f21e5e96
parent 135 4d836625fe3f
child 137 4d69e4c3c881
Enhance display of the security view Change the form renderer to use one that looks like the default one but without the "General information" title. Also, remove the field's help because here we don't want help about default 'owned_by' relation.
views/management.py
--- a/views/management.py	Wed Feb 22 22:24:51 2017 +0100
+++ b/views/management.py	Wed Feb 22 22:26:12 2017 +0100
@@ -40,7 +40,7 @@
         msg = self._cw.__('ownerships have been changed')
         form = self._cw.vreg['forms'].select(
             'base', self._cw, entity=entity,
-            form_renderer_id='onerowtable', submitmsg=msg,
+            form_renderer_id='base', submitmsg=msg,
             form_buttons=[formwidgets.SubmitButton()],
             domid='ownership%s' % entity.eid,
             __redirectvid='security',
@@ -49,6 +49,7 @@
                             self._cw.vreg.schema['owned_by'],
                             req=self._cw,
                             widget=RelationFacetWidget())
+        field.help = None
         form.append_field(field)
         form.render(w=w, display_progress_div=False)