Commit 49ad14bf authored by Alexandre Boeglin's avatar Alexandre Boeglin

"jump_allowed" now also inhibits the Base_jumpToRelatedDocument link.

(Base_jumpToRelatedDocument calls a ListBox form, thus displays links to Documents,
which we want "jump_allowed" to prevent. Documents are still selectable by inputting "%"
in the field and clicking the Form update button.)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3236 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8072539f
...@@ -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
else: elif field.get_value('jump_allowed') == 1 :
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,6 +159,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R ...@@ -159,6 +159,7 @@ 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('jump_allowed') == 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)
......
...@@ -181,7 +181,7 @@ class RelationStringFieldWidget(Widget.TextWidget, Widget.ListWidget): ...@@ -181,7 +181,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'):
else: elif field.get_value('jump_allowed') == 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(), % (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