Commit 38582730 authored by louiz’'s avatar louiz’

Fix two tb in the DataFormTab

- when list-multi doesn't have selected values at all
- text-multi.options() provided by sleekxmpp is apparently a '\n' separated
  string, and not a list
parent d78b7df6
......@@ -197,6 +197,7 @@ class TextMultiWin(FieldInput, windows.Win):
FieldInput.__init__(self, field)
self.options = field.getValue()
self.options = self.options.split('\n') if self.options else []
self.val_pos = 0
self.edition_input = None
if not isinstance(self.options, list):
......@@ -270,9 +271,9 @@ class ListMultiWin(FieldInput, windows.Win):
def __init__(self, field):
FieldInput.__init__(self, field)
values = field.getValue()
values = field.getValue() or []
self.options = [[option, True if option['value'] in values else False]\
for option in field.getOptions()]
for option in field.get_options()]
self.val_pos = 0
def do_command(self, key):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment