Commit 4823cbef authored by Vincent Pelletier's avatar Vincent Pelletier

Keep default value enabled, or validator fails.

parent 1580bcb0
......@@ -800,8 +800,8 @@ class SingleItemsWidget(ItemsWidget):
items = field.get_value('items', REQUEST=REQUEST, cell=cell)
if not items:
# single item widget should have at least one child in order to produce
# valid XHTML; disable it so user can not select it
return [self.render_item('', '', '', '', 'disabled="disabled"')]
# valid XHTML; keep it enabled otherwise field validator always fails
return [self.render_item('', '', '', '', '')]
# check if we want to select first item
if not value and field.get_value('first_item', REQUEST=REQUEST,
......
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