Commit 44c568bf authored by Rafael Monnerat's avatar Rafael Monnerat

If selection_name is not passed to this script, try to get it using...

If selection_name is not passed to this script, try to get it using "listbox_list_selection_name" at the request.

This is required to ListBoxes (showed from a website using erp5_web) use A..Z button for reset the selection, In this casethe selection_name does not come with the request when this button is clicked.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34078 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0a6732ca
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n <value> <string>request = context.REQUEST\n
\n \n
if selection_name is None:\n
selection_name = request.get(\'listbox_list_selection_name\')\n
\n
ps = context.portal_selections\n ps = context.portal_selections\n
ps.setSelectionToAll(selection_name, REQUEST=request, reset_domain_tree=True, reset_report_tree=True)\n ps.setSelectionToAll(selection_name, REQUEST=request, reset_domain_tree=True, reset_report_tree=True)\n
url = ps.getSelectionListUrlFor(selection_name, REQUEST=request)\n url = ps.getSelectionListUrlFor(selection_name, REQUEST=request)\n
...@@ -69,7 +72,7 @@ request.RESPONSE.redirect(url)\n ...@@ -69,7 +72,7 @@ request.RESPONSE.redirect(url)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection_name</string> </value> <value> <string>selection_name=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -99,6 +102,7 @@ request.RESPONSE.redirect(url)\n ...@@ -99,6 +102,7 @@ request.RESPONSE.redirect(url)\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>None</string>
<string>ps</string> <string>ps</string>
<string>True</string> <string>True</string>
<string>url</string> <string>url</string>
...@@ -113,7 +117,9 @@ request.RESPONSE.redirect(url)\n ...@@ -113,7 +117,9 @@ request.RESPONSE.redirect(url)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
1530 1531
\ No newline at end of file \ 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