[saem-devel] [PATCH 06 of 10 sherpa] Enhance display of the security view

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Feb 23 09:32:55 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1487798772 -3600
#      Wed Feb 22 22:26:12 2017 +0100
# Node ID 44f2f21e5e96f856780132ffa8be9d946a37e576
# Parent  4d836625fe3f05d624245e2a0ec0053c403fce2f
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.

diff --git a/views/management.py b/views/management.py
--- a/views/management.py
+++ b/views/management.py
@@ -38,19 +38,20 @@ class SherpaSecurityManagementView(manag
              xml_escape(entity.dc_title())))
         w('<h2>%s</h2>' % self._cw.__('Manage security'))
         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',
             __redirectpath=entity.rest_path())
         field = guess_field(entity.e_schema,
                             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)
 
 
 actions.ManagePermissionsAction.__select__ = (


More information about the saem-devel mailing list