Commit eaf11f01 authored by Rafael Monnerat's avatar Rafael Monnerat

Accept receive parameter throw a button. This is useful for multiple skins for xhtml style.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22742 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ae98683
...@@ -70,6 +70,9 @@ N_ = portal.Base_translateString\n ...@@ -70,6 +70,9 @@ N_ = portal.Base_translateString\n
preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n
request = context.REQUEST\n request = context.REQUEST\n
\n \n
if select_action is None:\n
select_action = request.form["Base_doAction"]\n
\n
# prevent lose checked itens after select action\n # prevent lose checked itens after select action\n
# For backward compatibility, do nothing if\n # For backward compatibility, do nothing if\n
# Base_updateListboxSelection cannot be found.\n # Base_updateListboxSelection cannot be found.\n
...@@ -147,7 +150,7 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters, ...@@ -147,7 +150,7 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>select_action, form_id, cancel_url, **kw</string> </value> <value> <string>select_action=None, form_id, cancel_url, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -183,12 +186,12 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters, ...@@ -183,12 +186,12 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<string>N_</string> <string>N_</string>
<string>preserved_parameters</string> <string>preserved_parameters</string>
<string>request</string> <string>request</string>
<string>getattr</string>
<string>None</string> <string>None</string>
<string>_getitem_</string>
<string>getattr</string>
<string>Base_updateListboxSelection</string> <string>Base_updateListboxSelection</string>
<string>Base_doAction</string> <string>Base_doAction</string>
<string>len</string> <string>len</string>
<string>_getitem_</string>
<string>doAction0</string> <string>doAction0</string>
<string>redirect_url</string> <string>redirect_url</string>
<string>_write_</string> <string>_write_</string>
...@@ -213,7 +216,11 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters, ...@@ -213,7 +216,11 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
<none/>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -65,7 +65,9 @@ ...@@ -65,7 +65,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if select_favorite == \'\':\n <value> <string>if select_favorite is None:\n
select_favorite = context.REQUEST.form["Base_doFavorite"]\n
if select_favorite == \'\':\n
return\n return\n
return context.ERP5Site_redirect(select_favorite, **kw)\n return context.ERP5Site_redirect(select_favorite, **kw)\n
</string> </value> </string> </value>
...@@ -90,7 +92,7 @@ return context.ERP5Site_redirect(select_favorite, **kw)\n ...@@ -90,7 +92,7 @@ return context.ERP5Site_redirect(select_favorite, **kw)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>select_favorite, **kw</string> </value> <value> <string>select_favorite=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -118,9 +120,11 @@ return context.ERP5Site_redirect(select_favorite, **kw)\n ...@@ -118,9 +120,11 @@ return context.ERP5Site_redirect(select_favorite, **kw)\n
<tuple> <tuple>
<string>select_favorite</string> <string>select_favorite</string>
<string>kw</string> <string>kw</string>
<string>_apply_</string> <string>None</string>
<string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_apply_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -132,7 +136,9 @@ return context.ERP5Site_redirect(select_favorite, **kw)\n ...@@ -132,7 +136,9 @@ return context.ERP5Site_redirect(select_favorite, **kw)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -72,6 +72,9 @@ Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', ...@@ -72,6 +72,9 @@ Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\',
if Base_updateListboxSelection is not None:\n if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n Base_updateListboxSelection()\n
\n \n
if select_jump is None:\n
select_jump = context.REQUEST.form["Base_doJump"]\n
\n
if select_jump == \'\':\n if select_jump == \'\':\n
return\n return\n
\n \n
...@@ -100,7 +103,7 @@ return context.ERP5Site_redirect(select_jump,\n ...@@ -100,7 +103,7 @@ return context.ERP5Site_redirect(select_jump,\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>select_jump, **kw</string> </value> <value> <string>select_jump=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -132,6 +135,7 @@ return context.ERP5Site_redirect(select_jump,\n ...@@ -132,6 +135,7 @@ return context.ERP5Site_redirect(select_jump,\n
<string>context</string> <string>context</string>
<string>None</string> <string>None</string>
<string>Base_updateListboxSelection</string> <string>Base_updateListboxSelection</string>
<string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>container</string> <string>container</string>
<string>request</string> <string>request</string>
...@@ -148,7 +152,9 @@ return context.ERP5Site_redirect(select_jump,\n ...@@ -148,7 +152,9 @@ return context.ERP5Site_redirect(select_jump,\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -67,6 +67,10 @@ ...@@ -67,6 +67,10 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX Localizer-dependent\n <value> <string># XXX Localizer-dependent\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n
if select_language is None:\n
select_language = context.REQUEST.form["Base_doLanguage"]\n
\n
portal.Localizer.changeLanguage(select_language)\n portal.Localizer.changeLanguage(select_language)\n
</string> </value> </string> </value>
</item> </item>
...@@ -90,7 +94,7 @@ portal.Localizer.changeLanguage(select_language)\n ...@@ -90,7 +94,7 @@ portal.Localizer.changeLanguage(select_language)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>select_language</string> </value> <value> <string>select_language=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -120,6 +124,8 @@ portal.Localizer.changeLanguage(select_language)\n ...@@ -120,6 +124,8 @@ portal.Localizer.changeLanguage(select_language)\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>None</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -131,7 +137,9 @@ portal.Localizer.changeLanguage(select_language)\n ...@@ -131,7 +137,9 @@ portal.Localizer.changeLanguage(select_language)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -65,7 +65,9 @@ ...@@ -65,7 +65,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if select_module == \'\':\n <value> <string>if select_module == None:\n
select_module = context.REQUEST.form["Base_doModule"]\n
if select_module == \'\':\n
return\n return\n
return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n
</string> </value> </string> </value>
...@@ -90,7 +92,7 @@ return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n ...@@ -90,7 +92,7 @@ return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>select_module, **kw</string> </value> <value> <string>select_module=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -118,9 +120,11 @@ return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n ...@@ -118,9 +120,11 @@ return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n
<tuple> <tuple>
<string>select_module</string> <string>select_module</string>
<string>kw</string> <string>kw</string>
<string>_apply_</string> <string>None</string>
<string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_apply_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -132,7 +136,9 @@ return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n ...@@ -132,7 +136,9 @@ return context.ERP5Site_redirect(\'%s/view\' % select_module, **kw)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
580 581
\ 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