Tarot: bidding phase

- quick_app: command line is now parsed, "profile" option allow to select it
- xml_tools: list-single is now managed
- plugin tarot: method and signal to manage contract (contrat): tarotChooseContrat & tarotGameContratChoosed
- wix: Q&D Form hack to manage more generic form (not only registration), used to show contract selection form
This commit is contained in:
Goffi 2010-05-27 19:26:19 +09:30
commit 2f2a611ba3

View file

@ -50,6 +50,8 @@ class XMLTools:
__field_type = "string"
elif field.fieldType == 'text-private':
__field_type = "password"
elif field.fieldType == 'list-single':
__field_type = "list"
else:
error (u"FIXME FIXME FIXME: Type [%s] is not managed yet by SàT" % field.fieldType)
__field_type = "string"
@ -59,9 +61,12 @@ class XMLTools:
elem.setAttribute('type', __field_type)
elem.setAttribute('label', field.label or "")
if field.value:
text = doc.createTextNode(field.value)
elem.appendChild(text)
elem.setAttribute('value', field.value)
top_element.appendChild(elem)
for option in field.options:
opt = doc.createElement('option')
opt.setAttribute('value', option.value)
elem.appendChild(opt)
result = doc.toxml()
doc.unlink()
return result