Commit f1507044 authored by Jérome Perrin's avatar Jérome Perrin

xhtml_style: make a button for exchange action

This way the checked uid are properly updated before the action is rendered.
TODO: factorize code in Base_do* script
parent 44338f01
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request = container.REQUEST\n
kw.update(request.form)\n
\n
portal = context.getPortalObject()\n
\n
# Base_updateListboxSelection cannot be found.\n
Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n
\n
action_context = portal.restrictedTraverse(request.get(\'object_path\', \'?\'), context)\n
\n
new_print_action_list = context.Base_fixDialogActions(\n
context.Base_filterDuplicateActions(\n
portal.portal_actions.listFilteredActionsFor(action_context)), \'object_exchange\')\n
\n
if new_print_action_list:\n
return context.ERP5Site_redirect(new_print_action_list[0][\'url\'],\n
keep_items={\'form_id\': form_id,\n
\'cancel_url\': cancel_url,\n
\'object_path\': request.get(\'object_path\', context.getPath()),\n
\'dialog_category\': \'object_exchange\'}, **kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id, cancel_url, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_doExchange</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -252,12 +252,12 @@
</tal:block>\n
<span tal:condition="exchange_actions | report_actions"\n
class="separator"><!--separator--></span>\n
<a tal:condition="exchange_actions" class="import_export" title="Import / Export"\n
tal:attributes="href python: portal.ERP5Site_renderCustomLink(exchange_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_exchange\')"\n
i18n:attributes="title" i18n:domain="ui">\n
<button tal:condition="exchange_actions" class="import_export"\n
type="submit" name="Base_doExchange:method" title="Import Export"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Import / Export</span>\n
</a>\n
</button>\n
<button tal:condition="report_actions" class="report" type="submit" name="Base_doReport:method" title="Report"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
......
1087
\ No newline at end of file
1088
\ 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