[forms] let the autoform specify the generic relation field label,
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 26 Jan 2010 20:29:52 +0100
changeset 4381 62a89969c8b3
parent 4380 5613d7c06339
child 4382 6fb02edd05da
[forms] let the autoform specify the generic relation field label, no need for a custom fieldset, may be handled as for other fields by the renderer.
web/views/editviews.py
--- a/web/views/editviews.py	Tue Jan 26 20:28:56 2010 +0100
+++ b/web/views/editviews.py	Tue Jan 26 20:29:52 2010 +0100
@@ -147,10 +147,7 @@
         req = form._cw
         _ = req._
         __ = _
-        label = u'%s :' % __('This %s' % form.edited_entity.e_schema).capitalize()
         eid = form.edited_entity.eid
-        w(u'<fieldset class="subentity">')
-        w(u'<legend class="iformTitle">%s</legend>' % label)
         w(u'<table id="relatedEntities">')
         for rschema, role, related in field.relations_table(form):
             # already linked entities
@@ -198,7 +195,6 @@
         w(u'<td id="unrelatedDivs_%s"></td>' % eid)
         w(u'</tr>')
         w(u'</table>')
-        w(u'</fieldset>')
         return '\n'.join(stream)
 
 
@@ -210,7 +206,6 @@
         kwargs['eidparam'] = True
         super(GenericRelationsField, self).__init__(name, **kwargs)
         self.relations = relations
-        self.label = None
 
     def process_posted(self, form):
         todelete = get_pending_deletes(form._cw)