Commit 2a7ab760 authored by Sebastien Robin's avatar Sebastien Robin

updated the render_read_only to render_view


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@231 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3fae58e4
...@@ -107,19 +107,11 @@ class RelationStringFieldWidget(Widget.TextWidget): ...@@ -107,19 +107,11 @@ class RelationStringFieldWidget(Widget.TextWidget):
% (field.get_value('jump_method'), field.id, field.aq_parent.id) % (field.get_value('jump_method'), field.id, field.aq_parent.id)
return html_string return html_string
def render_read_only(self, field, key, value, REQUEST): def render_view(self, field, value):
"""Render text input field. """Render text input field.
""" """
html_string = Widget.TextWidget.render_read_only(self, field, key, value, REQUEST) html_string = Widget.TextWidget.render_view(self, field, value)
# We used to add a button which has a path reference to a base category...
# but it really created too many problems
# now we do it in another way
# we compare what has been changed in the relation update script
if value not in ('', None): if value not in ('', None):
if REQUEST.get('selection_name') is not None:
html_string += '&nbsp;&nbsp;<a href="%s?field_id=%s&form_id=%s&selection_name=%s&selection_index=%s"><img src="/images/pro/images/jump.png"></a>' \
% (field.get_value('jump_method'), field.id, field.aq_parent.id, REQUEST.get('selection_name'), REQUEST.get('selection_index'))
else:
html_string += '&nbsp;&nbsp;<a href="%s?field_id=%s&form_id=%s"><img src="/images/pro/images/jump.png"></a>' \ html_string += '&nbsp;&nbsp;<a href="%s?field_id=%s&form_id=%s"><img src="/images/pro/images/jump.png"></a>' \
% (field.get_value('jump_method'), field.id, field.aq_parent.id) % (field.get_value('jump_method'), field.id, field.aq_parent.id)
return html_string return html_string
......
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