From 47df7f9d60cd01d368a3b2114e1f37ce90f1116e Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Tue, 1 Mar 2011 09:18:33 +0000 Subject: [PATCH] Extend script to ease its usage with specific use case (like edit text_content in dialog or pass some workflow transitions) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43839 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_crm/Base_addEvent.xml | 6 +++++- bt5/erp5_crm/bt/revision | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml index 0c823e4b4b1..d486fe693d0 100644 --- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_addEvent.xml @@ -109,11 +109,15 @@ event_kw[\'destination\'] = destination_url\n event_kw[\'destination_section\'] = destination_section_url\n event_kw[\'start_date\'] = start_date\n event_kw[\'follow_up\'] = follow_up\n +event_kw[\'text_content\'] = text_content\n \n # Create event\n module = portal.getDefaultModule(portal_type=portal_type)\n event = module.newContent(**event_kw)\n \n +if batch_mode:\n + return event\n +\n message = portal.Base_translateString(\'New event created.\')\n \n event.Base_redirect(keep_items={\'portal_status_message\': message})\n @@ -121,7 +125,7 @@ event.Base_redirect(keep_items={\'portal_status_message\': message})\n </item> <item> <key> <string>_params</string> </key> - <value> <string>title, direction, portal_type, resource, **kw</string> </value> + <value> <string>title, direction, portal_type, resource, text_content=None, batch_mode=False, **kw</string> </value> </item> <item> <key> <string>id</string> </key> diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision index 77555c31de9..f520b6ed4c0 100644 --- a/bt5/erp5_crm/bt/revision +++ b/bt5/erp5_crm/bt/revision @@ -1 +1 @@ -529 \ No newline at end of file +530 \ No newline at end of file -- 2.30.9