comparison src/tools/xml_tools.py @ 810:b11df74e49d2

core (XMLUI): fixed labels management for lists in _dataFormField2XMLUIData
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 18:32:46 +0100
parents 7c05c39156a2
children 1fe00f0c9a91
comparison
equal deleted inserted replaced
809:743b757777d3 810:b11df74e49d2
51 if widget_args[0] is None: 51 if widget_args[0] is None:
52 widget_args[0] = 'false' 52 widget_args[0] = 'false'
53 elif field.fieldType == 'list-single': 53 elif field.fieldType == 'list-single':
54 widget_type = "list" 54 widget_type = "list"
55 del widget_args[0] 55 del widget_args[0]
56 widget_kwargs["options"] = [option.value for option in field.options] 56 widget_kwargs["options"] = [(option.value, option.label or option.value) for option in field.options]
57 else: 57 else:
58 error(u"FIXME FIXME FIXME: Type [%s] is not managed yet by SàT" % field.fieldType) 58 error(u"FIXME FIXME FIXME: Type [%s] is not managed yet by SàT" % field.fieldType)
59 widget_type = "string" 59 widget_type = "string"
60 60
61 if field.var: 61 if field.var: