[web/views/reledit] explicitely add the field if the formid is base + line cleanups
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 08 Jul 2010 16:29:51 +0200
changeset 5945 846d1fb32aa8
parent 5930 23c23d7b5d6b
child 5946 9cbde75fefe8
[web/views/reledit] explicitely add the field if the formid is base + line cleanups
web/views/reledit.py
--- a/web/views/reledit.py	Wed Jul 07 16:41:36 2010 +0200
+++ b/web/views/reledit.py	Thu Jul 08 16:29:51 2010 +0200
@@ -32,12 +32,11 @@
     _cancelclick = "cw.reledit.cleanupAfterCancel('%s')"
 
     # ui side actions/buttons
-    _addzone = (u'<img title="%(msg)s" src="data/plus.png" '
-                u'alt="%(msg)s"/>')
+    _addzone = u'<img title="%(msg)s" src="data/plus.png" alt="%(msg)s"/>'
     _addmsg = _('click to add a value')
-    _deletezone = (u'<img title="%(msg)s" src="data/cancel.png" alt="%(msg)s"/>')
+    _deletezone = u'<img title="%(msg)s" src="data/cancel.png" alt="%(msg)s"/>'
     _deletemsg = _('click to delete this value')
-    _editzone = (u'<img title="%(msg)s" src="data/pen_icon.png" alt="%(msg)s"/>')
+    _editzone = u'<img title="%(msg)s" src="data/pen_icon.png" alt="%(msg)s"/>'
     _editzonemsg = _('click to edit this field')
 
     # default relation vids according to cardinality
@@ -107,6 +106,9 @@
             form, renderer = self._build_form(entity, rtype, role, divid, formid, default_value,
                                               reload, dict(vid=rvid),
                                               edit_related, add_related and ttypes[0])
+            if formid == 'base':
+                field = form.field_by_name(rtype, role, entity.e_schema)
+                form.append_field(field)
             self.view_form(divid, value, form, renderer, edit_related,
                            delete_related, add_related)