Commit 2a31bd1f authored by Rafael Monnerat's avatar Rafael Monnerat

Added a patch for RadioWidget.render to include missing render_prefix param.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22054 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1edfbbbf
......@@ -494,7 +494,7 @@ def StringBaseValidator_validate(self, field, key, REQUEST):
StringBaseValidator.validate = StringBaseValidator_validate
def Widget_render_hidden(self, field, key, value, REQUEST):
def Widget_render_hidden(self, field, key, value, REQUEST, render_prefix=None):
"""Renders this widget as a hidden field.
"""
try:
......@@ -719,10 +719,19 @@ def SingleItemsWidget_render_view(self, field, value, REQUEST=None, render_prefi
else:
return title_list[0]
return value
def RadioWidget_render(self, field, key, value, REQUEST, render_prefix=None):
rendered_items = self.render_items(field, key, value, REQUEST)
orientation = field.get_value('orientation')
if orientation == 'horizontal':
return string.join(rendered_items, "  ")
else:
return string.join(rendered_items, "<br />")
ListWidget.render_view = SingleItemsWidget_render_view
ListWidget.render_pdf = SingleItemsWidget_render_view
RadioWidget.render_view = SingleItemsWidget_render_view
RadioWidget.render = RadioWidget_render
RadioWidget.render_pdf = SingleItemsWidget_render_view
def MultiItemsWidget_render_items(self, field, key, value, REQUEST, render_prefix=None):
......
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