Commit 8f445236 authored by Bartek Górny's avatar Bartek Górny

email notification settings stored in preferences (#16)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10315 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0cd50059
No related merge requests found
...@@ -68,7 +68,10 @@ ...@@ -68,7 +68,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>subjecttpl=\'ingested %(name)s\'\n <value> <string>pref=context.portal_preferences.getPreferredDmsIngestEmailNotification()\n
if pref==\'never\':return\n
\n
subjecttpl=\'ingested %(name)s\'\n
msgtpl="""Your document "%(name)s" was successfully ingested.\n msgtpl="""Your document "%(name)s" was successfully ingested.\n
\n \n
click here: %(url)s/view to proceed with your work.\n click here: %(url)s/view to proceed with your work.\n
...@@ -123,16 +126,17 @@ context.MailHost.send(msg,mto,mfro,subject)\n ...@@ -123,16 +126,17 @@ context.MailHost.send(msg,mto,mfro,subject)\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>pref</string>
<string>subjecttpl</string> <string>subjecttpl</string>
<string>msgtpl</string> <string>msgtpl</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>ob</string> <string>ob</string>
<string>_getattr_</string>
<string>subject</string> <string>subject</string>
<string>msg</string> <string>msg</string>
<string>mto</string> <string>mto</string>
<string>mfro</string> <string>mfro</string>
<string>context</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<string>my_preferred_dms_reference_regexp</string> <string>my_preferred_dms_reference_regexp</string>
<string>my_preferred_dms_filename_regexp</string> <string>my_preferred_dms_filename_regexp</string>
<string>my_preferred_dms_reference_function</string> <string>my_preferred_dms_reference_function</string>
<string>my_preferred_dms_ingest_email_notification</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -61,6 +61,11 @@ class DMSPreference: ...@@ -61,6 +61,11 @@ class DMSPreference:
'type' : 'string', 'type' : 'string',
'preference':1, 'preference':1,
'mode' : '' }, 'mode' : '' },
{ 'id' : 'preferred_dms_ingest_email_notification',
'description' : 'None - always, "always", "problem (only if problem), "never"',
'type' : 'string', # is it possible to use int in radio?
'preference':1,
'mode' : '' },
) )
......
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