Commit 4ebb9e4e authored by Jérome Perrin's avatar Jérome Perrin

propagate REQUEST from render_view to to render_items_view, so that we can use

a non editable multilink fields as a listbox editable field



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27182 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 617a7075
......@@ -661,11 +661,13 @@ class MultiItemsWidget(ItemsWidget):
# rendered_items.append(render_element('input', type='hidden', name="default_%s:int" % (key, ), value="0"))
return rendered_items
def render_items_view(self, field, value):
def render_items_view(self, field, value, REQUEST):
if type(value) is not type([]):
value = [value]
items = field.get_value('items')
items = field.get_value('items',
REQUEST=REQUEST,
cell=getattr(REQUEST, 'cell', None))
d = {}
for item in items:
try:
......@@ -682,7 +684,7 @@ class MultiItemsWidget(ItemsWidget):
def render_view(self, field, value, REQUEST=None, render_prefix=None):
if value is None:
return ''
return string.join(self.render_items_view(field, value),
return string.join(self.render_items_view(field, value, REQUEST),
field.get_value('view_separator'))
class ListWidget(SingleItemsWidget):
......
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