Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
128
Merge Requests
128
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
0025ed86
Commit
0025ed86
authored
Jun 07, 2011
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge code with vifib_contract and rename script to be more generic
parent
b097a01d
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
2637 additions
and
3 deletions
+2637
-3
CredentialRequest_sendSubmittedNotification.xml
...redential/CredentialRequest_sendSubmittedNotification.xml
+116
-0
CredentialRequest_validateAgreement.xml
...s/erp5_credential/CredentialRequest_validateAgreement.xml
+74
-0
ERP5Site_activeLogin.xml
...tem/portal_skins/erp5_credential/ERP5Site_activeLogin.xml
+84
-0
ERP5Site_registerCredentialRequest.xml
...ns/erp5_credential/ERP5Site_registerCredentialRequest.xml
+117
-0
ERP5Site_viewCredentialRequestForm.xml
...ns/erp5_credential/ERP5Site_viewCredentialRequestForm.xml
+161
-0
my_description.xml
...ial/ERP5Site_viewCredentialRequestForm/my_description.xml
+115
-0
password_confirm.xml
...l/ERP5Site_viewCredentialRequestForm/password_confirm.xml
+133
-0
vifib_contract.xml
...ial/ERP5Site_viewCredentialRequestForm/vifib_contract.xml
+296
-0
your_captcha.xml
...ntial/ERP5Site_viewCredentialRequestForm/your_captcha.xml
+96
-0
your_career_subordination_title.xml
...CredentialRequestForm/your_career_subordination_title.xml
+124
-0
your_default_address_city.xml
...e_viewCredentialRequestForm/your_default_address_city.xml
+133
-0
your_default_address_street_address.xml
...entialRequestForm/your_default_address_street_address.xml
+133
-0
your_default_address_zip_code.xml
...ewCredentialRequestForm/your_default_address_zip_code.xml
+133
-0
your_default_email_text.xml
...ite_viewCredentialRequestForm/your_default_email_text.xml
+133
-0
your_default_telephone_text.xml
...viewCredentialRequestForm/your_default_telephone_text.xml
+124
-0
your_first_name.xml
...al/ERP5Site_viewCredentialRequestForm/your_first_name.xml
+133
-0
your_last_name.xml
...ial/ERP5Site_viewCredentialRequestForm/your_last_name.xml
+133
-0
your_password.xml
...tial/ERP5Site_viewCredentialRequestForm/your_password.xml
+109
-0
your_reference.xml
...ial/ERP5Site_viewCredentialRequestForm/your_reference.xml
+100
-0
your_term_confirmation.xml
...Site_viewCredentialRequestForm/your_term_confirmation.xml
+183
-0
dependency_list
bt5/erp5_credential/bt/dependency_list
+3
-1
revision
bt5/erp5_credential/bt/revision
+1
-1
template_path_list
bt5/erp5_credential/bt/template_path_list
+3
-1
No files found.
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendSubmittedNotification.xml
0 → 100644
View file @
0025ed86
<?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>
""" Send notification email when a person send subscription form.\n
Parameters:\n
context_url -- url of context (string)\n
notification_reference -- reference of notification message used to send email (string)\n
\n
Proxy\n
Member -- Use mailhost service\n
"""\n
\n
from random import randint\n
\n
#Get message\n
notification_message = context.portal_catalog.getResultValue(portal_type="Notification Message",\n
reference=notification_reference)\n
notification_message_reference = randint(0, 999**9)\n
\n
active_user_link = "%s/ERP5Site_activeLogin?key=%s" % (context_url,\n
notification_message_reference)\n
mapping_dict = {\'user\':context.getTitle(),\n
\'active_user_link\': active_user_link,\n
}\n
\n
if notification_message.getContentType() == "text/html":\n
mail_text = notification_message.asEntireHTML(\n
substitution_method_parameter_dict={\'mapping_dict\':mapping_dict})\n
else:\n
mail_text = notification_message.asText(\n
substitution_method_parameter_dict={\'mapping_dict\':mapping_dict})\n
\n
context.portal_notifications.sendMessage(\n
recipient=(context,),\n
subject=notification_message.getTitle(),\n
message=mail_text,\n
message_text_format=notification_message.getContentType(),\n
notifier_list=(\'Mail Message\',),\n
portal_type_list=("Notification Message",),\n
store_as_event=True,\n
event_keyword_argument_dict={\'follow_up\':context.getRelativeUrl(), \'reference\': notification_message_reference},\n
)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
context_url, notification_reference
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Author
</string>
<string>
Member
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CredentialRequest_sendSubmittedNotification
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_validateAgreement.xml
0 → 100644
View file @
0025ed86
<?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>
""" Use as validator method for a checkbox. \n
Return True if checked.\n
Parameters:\n
value -- State of checking (default:None,boolean)\n
REQUEST -- Standard request variable"""\n
if value:\n
return True\n
return False\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
value=None, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CredentialRequest_validateAgreement
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_activeLogin.xml
0 → 100644
View file @
0025ed86
<?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>
portal = context.getPortalObject()\n
\n
mail_message = portal.portal_catalog.getResultValue(portal_type="Mail Message", reference=key)\n
\n
credential_request = mail_message.getFollowUpValue()\n
\n
credential_request.submit(comment=\'Create by subscription form\')\n
mail_message.deliver()\n
message = "Your account is being activated. You will receive one e-mail after finish the activation"\n
return context.Base_redirect("login_form?portal_status_message=%s" % message)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
key
</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_activeLogin
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_registerCredentialRequest.xml
0 → 100644
View file @
0025ed86
<?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
)\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>
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_viewCredentialRequestForm.xml
0 → 100644
View file @
0025ed86
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5Form"
module=
"Products.ERP5Form.Form"
/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
ERP5Site_registerCredentialRequest
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
normal
</string>
<string>
left
</string>
<string>
right
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
your_first_name
</string>
<string>
your_last_name
</string>
<string>
your_reference
</string>
<string>
your_password
</string>
<string>
password_confirm
</string>
<string>
your_default_email_text
</string>
<string>
vifib_contract
</string>
<string>
your_term_confirmation
</string>
</list>
</value>
</item>
<item>
<key>
<string>
normal
</string>
</key>
<value>
<list>
<string>
my_description
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
your_career_subordination_title
</string>
<string>
your_default_telephone_text
</string>
<string>
your_default_address_street_address
</string>
<string>
your_default_address_zip_code
</string>
<string>
your_default_address_city
</string>
<string>
your_captcha
</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_viewCredentialRequestForm
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
WebSection_viewCustomerInformationsDialog
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_dialog
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Subscribe
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_viewCredentialRequestForm/my_description.xml
0 → 100644
View file @
0025ed86
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_description
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_translated_description
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewWebFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
python:"<h1>
%s
</h1>
" % (context.Base_translateString(context.getDescription()))