Commit 8c9d2602 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Not displaying the relation field 'wheel' was not a good idea, as there is

no more way to distinguish a relation field from a plain field, nor to
display a huge list of possibilities.

The better way to prevent jumping to related objects is simply to display a
listbox without clickable links.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3375 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3c7f24a8
...@@ -149,7 +149,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R ...@@ -149,7 +149,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R
# Delete default tales on the fly # Delete default tales on the fly
field.tales['items'] = None field.tales['items'] = None
elif field.get_value('allow_jump') == 1 : else:
html_string += '&nbsp;<input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s_%s:method">' \ html_string += '&nbsp;<input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s_%s:method">' \
% (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index, i) % (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index, i)
...@@ -159,7 +159,6 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R ...@@ -159,7 +159,6 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R
# no modification made, we can display only a lines text area widget # no modification made, we can display only a lines text area widget
html_string += Widget.LinesTextAreaWidget.render(self, field, key, value_list, REQUEST) html_string += Widget.LinesTextAreaWidget.render(self, field, key, value_list, REQUEST)
if field.get_value('allow_jump') == 1 :
html_string += '&nbsp;<input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \ html_string += '&nbsp;<input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \
% (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index) % (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index)
......
...@@ -188,7 +188,7 @@ class RelationStringFieldWidget(Widget.TextWidget, Widget.ListWidget): ...@@ -188,7 +188,7 @@ class RelationStringFieldWidget(Widget.TextWidget, Widget.ListWidget):
# we compare what has been changed in the relation update script # we compare what has been changed in the relation update script
#elif value != field.get_value('default'): #elif value != field.get_value('default'):
elif field.get_value('allow_jump') == 1 : else:
html_string += '&nbsp;<input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \ html_string += '&nbsp;<input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \
% (portal_url_string, portal_object.getPath(), % (portal_url_string, portal_object.getPath(),
getattr(field.aq_parent, '_v_relation_field_index', 0)) getattr(field.aq_parent, '_v_relation_field_index', 0))
......
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