Commit ecb22e5e authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_free_subscription: Use Emails in Free Subscription requests

parent 276d8333
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<portal_type id="Free Subscription Module"> <portal_type id="Free Subscription Module">
<item>Free Subscription</item> <item>Free Subscription</item>
</portal_type> </portal_type>
<portal_type id="Free Subscription Request">
<item>Email</item>
</portal_type>
<portal_type id="Free Subscription Request Module"> <portal_type id="Free Subscription Request Module">
<item>Free Subscription Request</item> <item>Free Subscription Request</item>
</portal_type> </portal_type>
......
...@@ -7,5 +7,6 @@ ...@@ -7,5 +7,6 @@
<item>Arrow</item> <item>Arrow</item>
<item>DublinCore</item> <item>DublinCore</item>
<item>Reference</item> <item>Reference</item>
<item>Person</item>
</portal_type> </portal_type>
</property_sheet_list> </property_sheet_list>
\ No newline at end of file
...@@ -58,12 +58,12 @@ if context.getValidationState() != \'submitted\':\n ...@@ -58,12 +58,12 @@ if context.getValidationState() != \'submitted\':\n
return\n return\n
if context.getDestination():\n if context.getDestination():\n
context.accept()\n context.accept()\n
elif hasattr(context, \'destination_person_default_email_text\'):\n elif context.getDefaultEmailCoordinateText():\n
email = context.destination_person_default_email_text\n email = context.getDefaultEmailCoordinateText()\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
person_list = portal.portal_catalog.getResultValue(\n person_list = portal.portal_catalog.getResultValue(\n
portal_type="Person",\n portal_type="Person",\n
default_email_text=email,\n reference=email,\n
)\n )\n
if person_list:\n if person_list:\n
context.reject(comment="Person already in the user data base")\n context.reject(comment="Person already in the user data base")\n
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
<string>my_resource_title</string> <string>my_resource_title</string>
<string>my_causality_title</string> <string>my_causality_title</string>
<string>my_follow_up_title</string> <string>my_follow_up_title</string>
<string>my_default_email_coordinate_text</string>
<string>my_default_email_url_string</string>
</list> </list>
</value> </value>
</item> </item>
......
<?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>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_default_email_coordinate_text</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>enabled</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>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_email</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</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>python: (here.hasDefaultEmail() and not here.getDefaultEmail().isDetailed()) or not here.hasDefaultEmail()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_default_email_url_string</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>enabled</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>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_email_url_string</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewBaseFieldLibrary</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>python:here.hasDefaultEmail() and here.getDefaultEmail().isDetailed()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Free Subscription Module | Free Subscription Free Subscription Module | Free Subscription
Free Subscription Request Module | Free Subscription Request Free Subscription Request Module | Free Subscription Request
Free Subscription Request | Email
\ No newline at end of file
Free Subscription Request | Arrow Free Subscription Request | Arrow
Free Subscription Request | DublinCore Free Subscription Request | DublinCore
Free Subscription Request | Reference Free Subscription Request | Reference
Free Subscription Request | Person
Free Subscription | DublinCore Free Subscription | DublinCore
Free Subscription | Version Free Subscription | Version
\ 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