[Erp5-report] r38990 fx.algrain - /experimental/bt5/erp5_credential/SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 8 10:19:29 CEST 2010


Author: fx.algrain
Date: Fri Oct  8 10:19:22 2010
New Revision: 38990

URL: http://svn.erp5.org?rev=38990&view=rev
Log:
We must send generic accepted notification : respect html or text choice.
(Content Type replace Text Format)

Modified:
    experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml

Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml?rev=38990&r1=38989&r2=38990&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRequest_sendAcceptedNotification.xml [utf8] Fri Oct  8 10:19:22 2010
@@ -78,8 +78,13 @@ if password:\n
   notification_mapping_dict.update(\n
                             {\'login_password\' : password})\n
 \n
-mail_text = notification_message.asText(\n
-  substitution_method_parameter_dict={\'mapping_dict\':notification_mapping_dict})\n
+#Preserve HTML else convert to text\n
+if notification_message.getContentType() == "text/html":\n
+  mail_text = notification_message.asHTML(\n
+    substitution_method_parameter_dict={\'mapping_dict\':notification_mapping_dict})\n
+else:\n
+  mail_text = notification_message.asText(\n
+    substitution_method_parameter_dict={\'mapping_dict\':notification_mapping_dict})\n
 \n
 #Send email\n
 portal.portal_notifications.sendMessage(\n
@@ -87,7 +92,7 @@ portal.portal_notifications.sendMessage(
   recipient=recipient,\n
   subject=notification_message.getTitle(),\n
   message=mail_text,\n
-  message_text_format=notification_message.getTextFormat(),\n
+  message_text_format=notification_message.getContentType(),\n
   notifier_list=(portal.portal_preferences.getPreferredLoginAndPasswordNotifier(),),\n
   store_as_event=True,\n
   event_keyword_argument_dict={\'follow_up\':context.getRelativeUrl()},\n




More information about the Erp5-report mailing list