<?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
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
                  role="client",\n
                  function="customer",\n
                  )\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
                                                     \'vifib-subscription.notification\')\n
else:\n
  notification_reference = \'vifib-subscription.notification\'\n
\n
context_url = context.absolute_url()\n
\n
# Send email to subscriber in activities.\n
document.activate(activity=\'SQLQueue\').CredentialRequest_sendSubscriptionNotificationForNewUser(\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>
