changeset 146:7c00c4b0a5c2

xml_tools: removed unused content parameter in addElement
author Goffi <goffi@goffi.org>
date Wed, 28 Jul 2010 19:52:01 +0800
parents c8b231abfe96
children dc692acde155
files tools/xml_tools.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tools/xml_tools.py	Wed Jul 28 19:51:17 2010 +0800
+++ b/tools/xml_tools.py	Wed Jul 28 19:52:01 2010 +0800
@@ -55,7 +55,7 @@
         else:
             form_ui.addEmpty()
 
-        elem = form_ui.addElement(__field_type, field.var, None, field.value, [option.value for option in field.options]) 
+        elem = form_ui.addElement(__field_type, field.var, field.value, [option.value for option in field.options]) 
     return form_ui.toXml()
 
 def tupleList2dataForm(values):
@@ -233,15 +233,16 @@
 
 
     
-    def addElement(self, type, name = None, content = None, value = None, options = None, callback_id = None):
+    def addElement(self, type, name = None, value = None, options = None, callback_id = None):
         """Convenience method to add element, the params correspond to the ones in addSomething methods"""
         if type == 'empty':
             self.addEmpty(name)
         elif type == 'text':
-            assert(content)
-            self.addText(content, name)
+            assert(value!=None)
+            self.addText(value, name)
         elif type == 'label':
             assert(value)
+            self.addLabel(value)
         elif type == 'string':
             self.addString(name, value)
         elif type == 'password':