Commit 6d4e1188 authored by Romain Courteaud's avatar Romain Courteaud

default has no meaning in Listbox, but as ERP5Form.Form request it, get_value

has to manage it.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7355 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6c055993
...@@ -2232,11 +2232,13 @@ class ListBox(ZMIField): ...@@ -2232,11 +2232,13 @@ class ListBox(ZMIField):
security.declareProtected('Access contents information', 'get_value') security.declareProtected('Access contents information', 'get_value')
def get_value(self, id, **kw): def get_value(self, id, **kw):
if (id == 'default') and \ if (id == 'default'):
(kw.get('render_format') in ('list', )): if (kw.get('render_format') in ('list', )):
return self.widget.render(self, self.generate_field_key(), None, return self.widget.render(self, self.generate_field_key(), None,
kw.get('REQUEST'), kw.get('REQUEST'),
render_format=kw.get('render_format')) render_format=kw.get('render_format'))
else:
return None
else: else:
# Try an ERP5-style accessor, if available. # Try an ERP5-style accessor, if available.
method_id = 'get' + convertToUpperCase(id) method_id = 'get' + convertToUpperCase(id)
......
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