Commit 57e6dbf6 authored by Gabriel Monnerat's avatar Gabriel Monnerat

remove script because Base_getDefaultAssignmentArgumentDict is not required...

remove script because Base_getDefaultAssignmentArgumentDict is not required anymore and ERP5Site_registerCredentialRequest was merged with ERP5Site_newCredentialRequest.
parent ee9adc59
<?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
Returns list with all categories defined on Credential\'s tab\n
"""\n
\n
portal_preferences = context.portal_preferences\n
return portal_preferences.getPreferredSubscriptionAssignmentCategoryList()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getDefaultAssignmentArgumentDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 encoding="cdata"><![CDATA[
REQUEST = context.REQUEST\n
language = context.getPortalObject().Localizer.get_selected_language()\n
module = context.getDefaultModule(\'Credential Request\')\n
username = reference\n
organisation_title = career_subordination_title\n
\n
category_list = context.Base_getDefaultAssignmentArgumentDict()\n
\n
document = module.newContent(portal_type=\'Credential Request\',\n
first_name=first_name,\n
last_name=last_name,\n
reference=username,\n
organisation_title=organisation_title,\n
default_email_text=default_email_text,\n
default_telephone_text=default_telephone_text,\n
default_address_street_address=default_address_street_address,\n
default_address_city=default_address_city,\n
default_address_zip_code=default_address_zip_code,\n
language=language,\n
)\n
\n
document.setCategoryList(category_list)\n
\n
if not password in ["", None] and len(password.replace(\' \',\'\')) > 0:\n
document.setPassword(password)\n
\n
if context.getPortalType() in ["Web Site", "Web Section"]:\n
notification_reference = context.getLayoutProperty(\'layout_subscription_notification_reference\',\n
\'erp5-subscription.notification\')\n
else:\n
notification_reference = \'erp5-subscription.notification\'\n
\n
context_url = context.absolute_url()\n
\n
# Send email to subscriber in activities.\n
document.activate(activity=\'SQLQueue\').CredentialRequest_sendSubmittedNotification(\n
context_url=context_url,\n
notification_reference=notification_reference)\n
\n
# Redirect to subscription accepted reference or by default, to home with message\n
message_text = "Thanks for your registration. You will be receive an email to activate your account."\n
message = "view?portal_status_message=" + context.Base_translateString(message_text)\n
redirect_url = \'%s/%s\' % (REQUEST.get(\'current_web_site\', context).absolute_url(),message)\n
return REQUEST.RESPONSE.redirect(redirect_url)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>first_name,last_name,reference,password,career_subordination_title,default_email_text,default_telephone_text,default_address_street_address,default_address_city,default_address_zip_code</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_registerCredentialRequest</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
352
\ No newline at end of file
353
\ 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