diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ContributionTool_newContent.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ContributionTool_newContent.xml index 54b99f0fbdd8fa2f652d49fcd00a709cb320c1d9..72f406ed8f41b98c6335778f5a1f3e6c95f1dfef 100644 --- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ContributionTool_newContent.xml +++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ContributionTool_newContent.xml @@ -71,24 +71,15 @@ <value> <string>"""\n Processes request of ContributionTool_viewContributeFileDialog\n does what is necessary and calls portal_contributions.newContent\n - redirects to what is returned\n + redirects to what is returned.\n """\n \n translateString = context.Base_translateString\n +portal_type = kw.get(\'portal_type\', None)\n \n -# clean up kw from file field otherwise \n -# ZODB raises an exception when committing transaction\n -kw.pop(\'field_your_file\', None)\n -# remove Base_callDialogMethod arg, otherwise it is set on context\n -# and then we can\'t execute any workflow transition\n -kw.pop(\'Base_callDialogMethod\', None)\n -\n -if kw[\'portal_type\'] == \'\':\n - # we don\'t want to set portal_type to \'\' :)\n - kw.pop(\'portal_type\', None)\n -\n -# ingest file\n -doc = context.portal_contributions.newContent(file=file, **kw)\n +# ingest file (asynchronously)\n +doc = context.portal_contributions.newContent(file = file,\n + portal_type = portal_type)\n \n msg = translateString("${portal_type} created successfully.",\n mapping = {\'portal_type\':doc.getPortalType()})\n @@ -149,8 +140,7 @@ return context.Base_redirect(\'view\', keep_items = {\'portal_status_message\':m <string>context</string> <string>translateString</string> <string>None</string> - <string>_getitem_</string> - <string>_apply_</string> + <string>portal_type</string> <string>doc</string> <string>msg</string> </tuple> diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision index 876cce90b1079891de8d9dfd1dbbadc35641e8de..d02412a497f89d3439d3be1b11d2020c9e1e327d 100644 --- a/bt5/erp5_dms/bt/revision +++ b/bt5/erp5_dms/bt/revision @@ -1 +1 @@ -654 \ No newline at end of file +655 \ No newline at end of file