Author: ashish
Date: Wed Aug 13 01:47:50 2008 New Revision: 685479 URL: http://svn.apache.org/viewvc?rev=685479&view=rev Log: We should pass the webSiteId to the sendMailFromScreen service. Because it tries to put the baseUrl value in the context if webSiteId is found as the input parameter to the service. Also sendMailFromScreen service return error if baseUrl don't exists in CreatePartyNotification.ftl. Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml ofbiz/trunk/applications/party/templates/email/CreatePartyNotification.ftl Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml?rev=685479&r1=685478&r2=685479&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml Wed Aug 13 01:47:50 2008 @@ -274,6 +274,10 @@ <find-by-primary-key value-name="emailAddressVerification" entity-name="EmailAddressVerification" map-name="lookupHash"/> <set field="bodyParameters.verifyHash" from-field="emailAddressVerification.verifyHash"/> <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/> + <entity-and list-name="webSites" entity-name="WebSite"> + <field-map field-name="productStoreId" env-name="storeEmail.productStoreId"/> + </entity-and> + <first-from-list entry-name="webSite" list-name="webSites"/> <if-not-empty field="storeEmail.bodyScreenLocation"> <set field="emailParams.sendTo" from-field="parameters.emailAddress"/> <set field="emailParams.subject" from-field="storeEmail.subject"/> @@ -284,6 +288,7 @@ <set field="emailParams.bodyParameters" from-field="bodyParameters"/> <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/> <map-to-map to-map-name="emailParams.bodyParameters" map-name="bodyParameters"/> + <set field="emailParams.webSiteId" from-field="webSite.webSiteId"/> <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/> </if-not-empty> </simple-method> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=685479&r1=685478&r2=685479&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Wed Aug 13 01:47:50 2008 @@ -827,6 +827,10 @@ </condition-list> </entity-condition> <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/> + <entity-and list-name="webSites" entity-name="WebSite"> + <field-map field-name="productStoreId" env-name="storeEmail.productStoreId"/> + </entity-and> + <first-from-list entry-name="webSite" list-name="webSites"/> <if-not-empty field="storeEmail.bodyScreenLocation"> <entity-one entity-name="Person" value-name="person"/> <set field="bodyParameters.person" from-field="person"/> @@ -839,6 +843,7 @@ <set field="emailParams.sendBcc" from-field="storeEmail.bccAddress"/> <set field="emailParams.contentType" from-field="storeEmail.contentType"/> <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/> + <set field="emailParams.webSiteId" from-field="webSite.webSiteId"/> <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/> </if-not-empty> </simple-method> @@ -852,6 +857,10 @@ </condition-list> </entity-condition> <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/> + <entity-and list-name="webSites" entity-name="WebSite"> + <field-map field-name="productStoreId" env-name="storeEmail.productStoreId"/> + </entity-and> + <first-from-list entry-name="webSite" list-name="webSites"/> <if-not-empty field="storeEmail.bodyScreenLocation"> <if-not-empty field="parameters.updatedUserLogin.partyId"> <set field="partyId" from-field="parameters.updatedUserLogin.partyId"/> @@ -878,6 +887,7 @@ <set field="emailParams.contentType" from-field="storeEmail.contentType"/> <set field="emailParams.bodyParameters" from-field="bodyParameters"/> <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/> + <set field="emailParams.webSiteId" from-field="webSite.webSiteId"/> <if-not-empty field="emailParams.sendTo"> <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/> Modified: ofbiz/trunk/applications/party/templates/email/CreatePartyNotification.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/templates/email/CreatePartyNotification.ftl?rev=685479&r1=685478&r2=685479&view=diff ============================================================================== --- ofbiz/trunk/applications/party/templates/email/CreatePartyNotification.ftl (original) +++ ofbiz/trunk/applications/party/templates/email/CreatePartyNotification.ftl Wed Aug 13 01:47:50 2008 @@ -1,31 +1,31 @@ -<#-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <title>${title}</title> - <link rel="stylesheet" href="${baseUrl}/images/maincss.css" type="text/css"/> - </head> - <body> - <h1>${title}</h1> - <p>Hello ${person.firstName?if_exists} ${person.lastName?if_exists},</p> - <p>Your account has been created successfully.</p> - </body> -</html> +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title>${title}</title> + <link rel="stylesheet" href="${baseUrl?if_exists}/images/maincss.css" type="text/css"/> + </head> + <body> + <h1>${title}</h1> + <p>Hello ${person.firstName?if_exists} ${person.lastName?if_exists},</p> + <p>Your account has been created successfully.</p> + </body> +</html> |
Free forum by Nabble | Edit this page |