Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
d85b90d3
Commit
d85b90d3
authored
Jun 17, 2015
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_free_sbscription: handle free subscription for anonymous
parent
8e9d647d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml
...erp5_free_subscription/FreeSubscriptionRequest_accept.xml
+20
-1
No files found.
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml
View file @
d85b90d3
...
...
@@ -54,8 +54,27 @@
Intent is to ignore accept/accept race conditions but complain about\n
any other race condition (ex: accept/reject).\n
"""\n
if context.getValidationState() != \'accepted\':\n
if context.getValidationState() != \'submitted\':\n
return\n
if context.getDestination():\n
context.accept()\n
elif hasattr(context, \'destination_person_default_email_text\'):\n
email = context.destination_person_default_email_text\n
portal = context.getPortalObject()\n
person_list = portal.portal_catalog.getResultValue(\n
portal_type="Person",\n
default_email_text=email,\n
)\n
if person_list:\n
context.reject(comment="Person already in the user data base")\n
else:\n
person = portal.person_module.newContent(\n
portal_type="Person",\n
default_email_text=email,\n
title=email,\n
)\n
context.setDestination(person.getRelativeUrl())\n
context.accept()\n
</string>
</value>
</item>
<item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment