Commit 659b7217 authored by Nicolas Delaby's avatar Nicolas Delaby

* add support of render_odt for LinesField

reviewed by Romain


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31787 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4c0e3c6e
...@@ -562,6 +562,17 @@ class LinesTextAreaWidget(TextAreaWidget): ...@@ -562,6 +562,17 @@ class LinesTextAreaWidget(TextAreaWidget):
value = [value] value = [value]
return string.join(value, field.get_value('view_separator')) return string.join(value, field.get_value('view_separator'))
def render_odt(self, field, value, as_string, ooo_builder, REQUEST,
render_prefix, attr_dict, local_name):
if value is None:
value = ['']
elif isinstance(value, (str, unicode)):
value = [value]
value = '\n'.join(value)
return TextAreaWidget.render_odt(self, field, value, as_string,
ooo_builder, REQUEST, render_prefix,
attr_dict, local_name)
LinesTextAreaWidgetInstance = LinesTextAreaWidget() LinesTextAreaWidgetInstance = LinesTextAreaWidget()
class FileWidget(TextWidget): class FileWidget(TextWidget):
......
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