xml_tools: removed unused content parameter in addElement
This commit is contained in:
parent
25dc55aa9f
commit
11a144a16b
1 changed files with 5 additions and 4 deletions
|
|
@ -55,7 +55,7 @@ def dataForm2xml(form):
|
|||
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 @@ class XMLUI:
|
|||
|
||||
|
||||
|
||||
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':
|
||||
|
|
|
|||
Loading…
Reference in a new issue