Commit 4246e1dc authored by Vincent Pelletier's avatar Vincent Pelletier

Do not pass previous_form_id to dialog page to select a related object....

Do not pass previous_form_id to dialog page to select a related object. form_id is meant for this, so don't trash it with dialog_id value.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8914 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6614b3de
...@@ -1084,8 +1084,8 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1084,8 +1084,8 @@ class SelectionTool( UniqueObject, SimpleItem ):
field_key = field.generate_field_key() field_key = field.generate_field_key()
field_value = REQUEST.form[field_key] field_value = REQUEST.form[field_key]
# XXX Hardcoded form name # XXX Hardcoded form name
redirect_form_id = 'Base_viewRelatedObjectList' dialog_id = 'Base_viewRelatedObjectList'
redirect_form = getattr(o, redirect_form_id) redirect_form = getattr(o, dialog_id)
# XXX Hardcoded listbox field # XXX Hardcoded listbox field
selection_name = redirect_form.listbox.get_value('selection_name') selection_name = redirect_form.listbox.get_value('selection_name')
# Reset current selection # Reset current selection
...@@ -1135,7 +1135,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1135,7 +1135,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
base_category = None base_category = None
kw = {} kw = {}
kw['object_uid'] = object_uid kw['object_uid'] = object_uid
kw['form_id'] = redirect_form_id kw['dialog_id'] = dialog_id
kw['selection_name'] = selection_name kw['selection_name'] = selection_name
kw['selection_index'] = 0 # We start on the first page kw['selection_index'] = 0 # We start on the first page
kw['field_id'] = field.id kw['field_id'] = field.id
...@@ -1147,7 +1147,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1147,7 +1147,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
kw['reset'] = 0 kw['reset'] = 0
kw['base_category'] = field.get_value( 'base_category') kw['base_category'] = field.get_value( 'base_category')
kw['cancel_url'] = REQUEST.get('HTTP_REFERER') kw['cancel_url'] = REQUEST.get('HTTP_REFERER')
kw['previous_form_id'] = form_id kw['form_id'] = form_id
kw[field.get_value('catalog_index')] = field_value kw[field.get_value('catalog_index')] = field_value
kw['portal_status_message'] = portal_status_message kw['portal_status_message'] = portal_status_message
kw['form_pickle'] = form_pickle kw['form_pickle'] = form_pickle
...@@ -1157,9 +1157,9 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1157,9 +1157,9 @@ class SelectionTool( UniqueObject, SimpleItem ):
REQUEST.form = kw # New request form REQUEST.form = kw # New request form
# Define new HTTP_REFERER # Define new HTTP_REFERER
REQUEST.HTTP_REFERER = '%s/%s' % (o.absolute_url(), REQUEST.HTTP_REFERER = '%s/%s' % (o.absolute_url(),
redirect_form_id) dialog_id)
# Return the search dialog # Return the search dialog
return getattr(o, redirect_form_id)(REQUEST=REQUEST) return getattr(o, dialog_id)(REQUEST=REQUEST)
def _aq_dynamic(self, name): def _aq_dynamic(self, name):
""" """
......
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