Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
43b1531d
Commit
43b1531d
authored
May 01, 2012
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use prefered_sender_section for credential related messages if exist.
parent
37298336
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
7 deletions
+33
-7
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRecovery_sendPasswordResetLink.xml
...5_credential/CredentialRecovery_sendPasswordResetLink.xml
+5
-0
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRecovery_sendUsernameRecoveryMessage.xml
...ential/CredentialRecovery_sendUsernameRecoveryMessage.xml
+11
-3
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
...credential/CredentialRequest_sendAcceptedNotification.xml
+5
-1
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendSubmittedNotification.xml
...redential/CredentialRequest_sendSubmittedNotification.xml
+8
-2
bt5/erp5_credential/bt/change_log
bt5/erp5_credential/bt/change_log
+3
-0
bt5/erp5_credential/bt/revision
bt5/erp5_credential/bt/revision
+1
-1
No files found.
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRecovery_sendPasswordResetLink.xml
View file @
43b1531d
...
...
@@ -73,8 +73,13 @@ if context.hasStopDate():\n
else:\n
kw = {}\n
\n
sender = portal.portal_preferences.getPreferredSenderSection()\n
if sender is not None:\n
sender = portal.restrictedTraverse(sender)\n
\n
portal.portal_password.mailPasswordResetRequest(user_login=reference,\n
REQUEST=context.REQUEST,\n
sender=sender,\n
notification_message=notification_message,\n
store_as_event=portal.portal_preferences.isPreferredStoreEvents(),\n
**kw)\n
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRecovery_sendUsernameRecoveryMessage.xml
View file @
43b1531d
...
...
@@ -63,9 +63,12 @@ for person in person_list:\n
usernames = " ".join(usernames)\n
\n
reference_list = [x.getReference() for x in person_list]\n
message_reference = portal.portal_preferences.getPreferredCredentialUsernameRecoveryMessageReference()\n
if message_reference is None:\n
raise ValueError, "Preference not configured"\n
if context.hasDocumentReference():\n
message_reference = context.getDocumentReference()\n
else:\n
message_reference = portal.portal_preferences.getPreferredCredentialUsernameRecoveryMessageReference()\n
if message_reference is None:\n
raise ValueError, "Preference not configured"\n
\n
notification_message = portal.NotificationTool_getDocumentValue(message_reference,\n
context.getLanguage())\n
...
...
@@ -80,7 +83,12 @@ else:\n
\n
subject = notification_message.asSubjectText(substitution_method_parameter_dict={\'mapping_dict\':mapping_dict})\n
\n
sender = portal.portal_preferences.getPreferredSenderSection()\n
if sender is not None:\n
sender = portal.restrictedTraverse(sender)\n
\n
portal.portal_notifications.sendMessage(\n
sender=sender,\n
recipient=person_list,\n
subject=subject,\n
message=mail_text,\n
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
View file @
43b1531d
...
...
@@ -85,8 +85,12 @@ else:\n
substitution_method_parameter_dict={\'mapping_dict\':notification_mapping_dict})\n
\n
#Send email\n
sender = portal.portal_preferences.getPreferredSenderSection()\n
if sender is not None:\n
sender = portal.restrictedTraverse(sender)\n
\n
portal.portal_notifications.sendMessage(\n
sender=
None
,\n
sender=
sender
,\n
recipient=recipient,\n
subject=notification_message.getTitle(),\n
message=mail_text,\n
...
...
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendSubmittedNotification.xml
View file @
43b1531d
...
...
@@ -60,9 +60,10 @@ Member -- Use mailhost service\n
"""\n
\n
from random import randint\n
portal = context.getPortalObject()\n
\n
#Get message\n
notification_message =
context
.portal_catalog.getResultValue(portal_type="Notification Message",\n
notification_message =
portal
.portal_catalog.getResultValue(portal_type="Notification Message",\n
reference=notification_reference)\n
notification_message_reference = randint(0, 999**9)\n
\n
...
...
@@ -79,7 +80,12 @@ else:\n
mail_text = notification_message.asText(\n
substitution_method_parameter_dict={\'mapping_dict\':mapping_dict})\n
\n
context.portal_notifications.sendMessage(\n
sender = portal.portal_preferences.getPreferredSenderSection()\n
if sender is not None:\n
sender = portal.restrictedTraverse(sender)\n
\n
portal.portal_notifications.sendMessage(\n
sender=sender,\n
recipient=(context,),\n
subject=notification_message.getTitle(),\n
message=mail_text,\n
...
...
bt5/erp5_credential/bt/change_log
View file @
43b1531d
2012-05-01 Kazuhiko
* use prefered_sender_section for credential related messages if exist.
2012-04-27 Kazuhiko
* use document_reference in Credential Recovery as the reference of nofitication message if exists.
...
...
bt5/erp5_credential/bt/revision
View file @
43b1531d
415
\ No newline at end of file
416
\ No newline at end of file
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