Commit ad8731c3 authored by Jérome Perrin's avatar Jérome Perrin

use the display value when rendering relation fields as non editable


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44304 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb4ac92d
...@@ -335,10 +335,10 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -335,10 +335,10 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
kw[k] = v kw[k] = v
accessor_name = 'get%sValueList' % ''.join([part.capitalize() for part in base_category.split('_')]) accessor_name = 'get%sValueList' % ''.join([part.capitalize() for part in base_category.split('_')])
jump_reference_list = getattr(here, accessor_name)(portal_type=portal_type, filter=kw) jump_reference_list = getattr(here, accessor_name)(portal_type=portal_type, filter=kw)
for jump_reference in jump_reference_list: for jump_reference, display_value in zip(jump_reference_list, value):
string_list.append('<a href="%s">%s</a>' % \ string_list.append('<a href="%s">%s</a>' % \
(jump_reference.absolute_url(), (jump_reference.absolute_url(),
jump_reference.getTitle())) display_value))
html_string = '<br />'.join(string_list) html_string = '<br />'.join(string_list)
else: else:
html_string = self.default_widget_rendering_instance.render_view(field, html_string = self.default_widget_rendering_instance.render_view(field,
......
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