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