Commit 2e3305ac authored by Jérome Perrin's avatar Jérome Perrin

always use dialog actions from REQUEST['object_path'], this way when an action...

always use dialog actions from REQUEST['object_path'], this way when an action is based on another context, we still have other dialog actions from the original context

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37380 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 50be8725
......@@ -61,7 +61,13 @@ if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n
\n
kw.update(context.REQUEST.form)\n
return context.ERP5Site_redirect(select_dialog.split()[0], keep_items={\'dialog_category\': dialog_category, \'form_id\': form_id, \'cancel_url\': cancel_url}, **kw)\n
keep_items=dict(\n
dialog_category=dialog_category,\n
form_id=form_id,\n
cancel_url=cancel_url,\n
object_path=object_path)\n
\n
return context.ERP5Site_redirect(select_dialog.split()[0], keep_items=keep_items, **kw)\n
</string> </value>
</item>
<item>
......@@ -72,7 +78,7 @@ return context.ERP5Site_redirect(select_dialog.split()[0], keep_items={\'dialog_
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>select_dialog, dialog_category, form_id, cancel_url, **kw</string> </value>
<value> <string>select_dialog, dialog_category, form_id, cancel_url, object_path, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -92,7 +98,7 @@ return context.ERP5Site_redirect(select_dialog.split()[0], keep_items={\'dialog_
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>4</int> </value>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -102,12 +108,15 @@ return context.ERP5Site_redirect(select_dialog.split()[0], keep_items={\'dialog_
<string>dialog_category</string>
<string>form_id</string>
<string>cancel_url</string>
<string>object_path</string>
<string>kw</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>Base_updateListboxSelection</string>
<string>_getattr_</string>
<string>dict</string>
<string>keep_items</string>
<string>_apply_</string>
<string>_getitem_</string>
</tuple>
......
......@@ -51,7 +51,7 @@
global dialog_category request/dialog_category | nothing;\n
\n
local_parameter_list local_parameter_list | python: {};\n
dummy python: local_parameter_list.update({\'dialog_id\': dialog_id, \'dialog_method\': dialog_method, \'update_method\': update_action, \'dialog_category\': dialog_category, \'cancel_url\': request.get(\'cancel_url\'), \'form_id\': form_id});\n
dummy python: local_parameter_list.update({\'dialog_id\': dialog_id, \'dialog_method\': dialog_method, \'update_method\': update_action, \'dialog_category\': dialog_category, \'cancel_url\': request.get(\'cancel_url\'), \'form_id\': form_id, \'object_path\': request.get(\'object_path\', context.getPath())});\n
title python: here.Base_translateString(here.Base_getFormViewDialogActionButtonTitle(form))">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n
......
......@@ -47,8 +47,9 @@
<tal:block tal:define="\n
global portal here/portal_url/getPortalObject;\n
global portal_path portal/absolute_url;\n
local_parameter_list local_parameter_list | python: {};\n
global actions python: here.Base_filterDuplicateActions(portal.portal_actions.listFilteredActionsFor(here));\n
local_parameter_list local_parameter_list | python: {};\n
action_context python: portal.restrictedTraverse(request.get(\'object_path\', \'?\'), here);\n
global actions python: here.Base_filterDuplicateActions(portal.portal_actions.listFilteredActionsFor(action_context));\n
global url here/absolute_url;\n
global current_form_id python: local_parameter_list.get(\'dialog_id\', local_parameter_list.get(\'form_id\', \'view\'));\n
dummy python: request.set(\'current_form_id\', current_form_id);\n
......
967
\ No newline at end of file
968
\ No newline at end of file
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