Commit c79e86b2 authored by Nicolas Delaby's avatar Nicolas Delaby

Various modifications in order to make ingestion process smoother

- Activate alarm by default
- hide title and source_organisation_title field
- make field resource required
- trig alarm manually at form submission step (XXX id hardcoded)
- rename captcha title
parent c6c5c8e3
...@@ -18,7 +18,7 @@ Web Message can be created by Anonymous Users</string> </value> ...@@ -18,7 +18,7 @@ Web Message can be created by Anonymous Users</string> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -69,7 +69,7 @@ edit_kw = {\'portal_type\': portal_type,\n ...@@ -69,7 +69,7 @@ edit_kw = {\'portal_type\': portal_type,\n
\'text_content\': text_content,\n \'text_content\': text_content,\n
\'content_type\': \'text/plain\',\n \'content_type\': \'text/plain\',\n
\'resource\': resource,\n \'resource\': resource,\n
\'source_carrier\': context.getRelativeUrl(),\n \'source_carrier\': context.getWebSectionValue().getRelativeUrl(),\n
}\n }\n
connected_user = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n connected_user = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if connected_user is not None:\n if connected_user is not None:\n
...@@ -78,10 +78,13 @@ if connected_user is not None:\n ...@@ -78,10 +78,13 @@ if connected_user is not None:\n
# We do not call portal_contribution for two reasons:\n # We do not call portal_contribution for two reasons:\n
# 1- Metadata discovery will be run by alarms with allowed user to access other documents.\n # 1- Metadata discovery will be run by alarms with allowed user to access other documents.\n
# 2- A proxy role can not wrap portal_contributions calls and disallow Anonymous user to create the document.\n # 2- A proxy role can not wrap portal_contributions calls and disallow Anonymous user to create the document.\n
module.activate(activity=\'SQLQueue\').EventModule_addWebMessage(**edit_kw)\n tag = \'incoming_web_message\'\n
module.activate(tag=tag, activity=\'SQLQueue\').EventModule_addWebMessage(**edit_kw)\n
\n \n
# An alarm will lately run discoverMetadata on created event, then \n # Trig explicitely alarm which will run discoverMetadata on created event, then \n
# Fill in discoverable properties (sender, recipient, ...) and change workflow states.\n # Fill in discoverable properties (sender, recipient, ...) and change workflow states.\n
# XXX hardcoded id, must be picked up by reference and version API\n
portal.portal_alarms.fetch_incoming_web_message_list.activate(after_tag=tag).activeSense()\n
\n \n
portal_status_message = translate(\'Your message has been successfully submitted.\')\n portal_status_message = translate(\'Your message has been successfully submitted.\')\n
context.getParentValue().Base_redirect(keep_items={\'portal_status_message\': portal_status_message})\n context.getParentValue().Base_redirect(keep_items={\'portal_status_message\': portal_status_message})\n
......
...@@ -86,7 +86,10 @@ ...@@ -86,7 +86,10 @@
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list/> <list>
<string>your_source_organisation_title</string>
<string>your_title</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -98,9 +101,7 @@ ...@@ -98,9 +101,7 @@
<string>your_source_person_last_name</string> <string>your_source_person_last_name</string>
<string>your_source_person_default_email_text</string> <string>your_source_person_default_email_text</string>
<string>your_source_person_telephone_text</string> <string>your_source_person_telephone_text</string>
<string>your_source_organisation_title</string>
<string>your_resource</string> <string>your_resource</string>
<string>your_title</string>
<string>your_text_content</string> <string>your_text_content</string>
<string>your_captcha</string> <string>your_captcha</string>
</list> </list>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>css_class</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -71,6 +72,10 @@ ...@@ -71,6 +72,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>required</string> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>your_captcha</string> </value> <value> <string>your_captcha</string> </value>
...@@ -85,7 +90,7 @@ ...@@ -85,7 +90,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Password</string> </value> <value> <string>Type in the string of letters that you see in the image into the text box</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>enabled</string>
<string>first_item</string> <string>first_item</string>
<string>items</string> <string>items</string>
<string>required</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -55,12 +55,6 @@ ...@@ -55,12 +55,6 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -76,7 +70,7 @@ ...@@ -76,7 +70,7 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -94,10 +88,6 @@ ...@@ -94,10 +88,6 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_radio_field</string> </value> <value> <string>my_radio_field</string> </value>
...@@ -116,13 +106,17 @@ ...@@ -116,13 +106,17 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Category</string> </value> <value> <string>Message Subject</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -131,23 +125,6 @@ ...@@ -131,23 +125,6 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <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: here.WebSection_getEventResourceItemList()[0] == (\'\', \'\') and (len(here.WebSection_getEventResourceItemList()) > 1) or (here.WebSection_getEventResourceItemList()[0] != (\'\', \'\') and len(here.WebSection_getEventResourceItemList()))
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle> </pickle>
......
1046 1047
\ No newline at end of file \ 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