changeset 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 743b757777d3
children 1fe00f0c9a91
files src/tools/xml_tools.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Tue Feb 04 18:32:39 2014 +0100
+++ b/src/tools/xml_tools.py	Tue Feb 04 18:32:46 2014 +0100
@@ -53,7 +53,7 @@
     elif field.fieldType == 'list-single':
         widget_type = "list"
         del widget_args[0]
-        widget_kwargs["options"] = [option.value for option in field.options]
+        widget_kwargs["options"] = [(option.value, option.label or option.value) for option in field.options]
     else:
         error(u"FIXME FIXME FIXME: Type [%s] is not managed yet by SàT" % field.fieldType)
         widget_type = "string"