diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml new file mode 100644 index 0000000000000000000000000000000000000000..c6cf138ef7945b3581e27616e7d46c67f1575f13 --- /dev/null +++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml @@ -0,0 +1,175 @@ +<?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>"""\n + Create basic KM account using ERP5 credentials system.\n +"""\n +from Products.Formulator.Errors import ValidationError, FormValidationError\n +portal = context.getPortalObject()\n +translateString = context.Base_translateString\n +website = context.getWebSiteValue()\n +\n +# Call Base_edit\n +result, result_type = context.Base_edit(form_id, silent_mode=1, field_prefix=\'your_\')\n +\n +# Return if not appropriate\n +if result_type != \'edit\':\n + return result\n +kw, encapsulated_editor_list = result\n +\n +# XXX: hard coded due to erp5_credentials requirement\n +kw[\'role_list\'] = [\'internal\']\n +kw.pop(\'password_confirm\', None)\n +default_email_text = reference = kw.pop(\'default_email_text\')\n +context.ERP5Site_newCredentialRequest(reference=reference, \\\n + default_email_text=default_email_text, **kw)\n +\n +msg = translateString("Your account was successfully created. You will be notified by email how to proceed.")\n +return website.Base_redirect(form_id, keep_items=dict(portal_status_message=msg,\n + editable_mode=0))\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>form_id</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>form_id</string> + <string>Products.Formulator.Errors</string> + <string>ValidationError</string> + <string>FormValidationError</string> + <string>_getattr_</string> + <string>context</string> + <string>portal</string> + <string>translateString</string> + <string>website</string> + <string>_getiter_</string> + <string>result</string> + <string>result_type</string> + <string>kw</string> + <string>encapsulated_editor_list</string> + <string>_write_</string> + <string>None</string> + <string>default_email_text</string> + <string>reference</string> + <string>_apply_</string> + <string>msg</string> + <string>dict</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>WebSite_createWebSiteAccount</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Create Web Site User Account</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_km/bt/dependency_list b/bt5/erp5_km/bt/dependency_list index 4e0a6cc537773317d320b1f167a2f227a60cffc9..f879d81b831aab824c6882a638c9ae61e1627879 100644 --- a/bt5/erp5_km/bt/dependency_list +++ b/bt5/erp5_km/bt/dependency_list @@ -1,3 +1,4 @@ +erp5_credential erp5_knowledge_pad erp5_dms erp5_web \ No newline at end of file diff --git a/bt5/erp5_km/bt/revision b/bt5/erp5_km/bt/revision index 640e39f73cc4014e94fd3f57998930a12af7cee0..3a2ac0e3fa68bbe9eded20380ed1c7ffcb27c6cb 100644 --- a/bt5/erp5_km/bt/revision +++ b/bt5/erp5_km/bt/revision @@ -1 +1 @@ -1700 \ No newline at end of file +1701 \ No newline at end of file