svn commit: r779034 - in /ofbiz/trunk/specialpurpose/myportal: script/org/ofbiz/myportal/Events.xml widget/RegisterPerson.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r779034 - in /ofbiz/trunk/specialpurpose/myportal: script/org/ofbiz/myportal/Events.xml widget/RegisterPerson.ftl

hansbak-2
Author: hansbak
Date: Wed May 27 07:24:08 2009
New Revision: 779034

URL: http://svn.apache.org/viewvc?rev=779034&view=rev
Log:
improved new userlogin screen when in error, if template email missing still possible to register with error message in the log

Modified:
    ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml
    ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl

Modified: ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml?rev=779034&r1=779033&r2=779034&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml Wed May 27 07:24:08 2009
@@ -160,20 +160,25 @@
                 <entity-one entity-name="WebSite" value-field="webSite"/>
                 <set field="storeEmailLookup.emailTemplateSettingId" value="PARTY_REGISTER"/>
                 <find-by-primary-key map="storeEmailLookup" entity-name="EmailTemplateSetting"  value-field="storeEmail"/>
-                <get-related-one value-field="createdUserLogin" relation-name="Person" to-value-field="person"/>
-                <set field="bodyParameters.person" from-field="person"/>
-                <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
-                <set field="emailParams.sendTo" from-field="emailContext.emailAddress"/>
-                <set field="emailParams.subject" from-field="storeEmail.subject"/>
-                <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
-                <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
-                <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"/>
-                <set field="emailParams.emailType" from-field="storeEmail.emailType"/>
-                <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/>    
-      
+                <if-not-empty field="storeEmail">
+                    <get-related-one value-field="createdUserLogin" relation-name="Person" to-value-field="person"/>
+                    <set field="bodyParameters.person" from-field="person"/>
+                    <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
+                    <set field="emailParams.sendTo" from-field="emailContext.emailAddress"/>
+                    <set field="emailParams.subject" from-field="storeEmail.subject"/>
+                    <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
+                    <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
+                    <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"/>
+                    <set field="emailParams.emailType" from-field="storeEmail.emailType"/>
+                    <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/>
+                    <else>
+                        <log level="error" message="Email template ${storeEmailLookup.emailTemplateSettingId} not found in entity EmailTemplateSetting, no confirmation email sent"></log>
+                    </else>
+                </if-not-empty>
+                
                 <!-- Create Customer Request to show new registration-->
                 <set field="custRequest.custRequestTypeId" value="RF_SUPPORT"/>
                 <set field="custRequest.fromPartyId" from-field="partyId"/>

Modified: ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl?rev=779034&r1=779033&r2=779034&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl (original)
+++ ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl Wed May 27 07:24:08 2009
@@ -17,33 +17,33 @@
     <tr>
      <td class="label">    Salutation    </td>
     <td class="no-required">
-     <input type="text" autocomplete="off" id="RegisterPerson_salutation" maxlength="60" size="40" name="salutation"/>
+     <input type="text" autocomplete="off" id="RegisterPerson_salutation" maxlength="60" size="40" name="salutation" value="${requestParameters.salutation?if_exists}"/>
     </td>
     </tr>
     <tr>
     <td class="label"> First name    </td>
     <td>
- <input type="text" autocomplete="off" id="RegisterPerson_firstName" maxlength="60" size="40" class="required false" name="firstName"/>
+ <input type="text" autocomplete="off" id="RegisterPerson_firstName" maxlength="60" size="40" class="required false" name="firstName" value="${requestParameters.firstName?if_exists}"/>
  <span class="tooltip">Required</span>    
  </td>
     </tr>
     <tr>
     <td class="label"> Middle Name    </td>
     <td class="no-required">
- <input type="text" autocomplete="off" id="RegisterPerson_middleName" maxlength="60" size="40" name="middleName"/>
+ <input type="text" autocomplete="off" id="RegisterPerson_middleName" maxlength="60" size="40" name="middleName" value="${requestParameters.middleName?if_exists}"/>
     </td>
     </tr>
     <tr>
     <td class="label"> Last name    </td>
     <td>
- <input type="text" autocomplete="off" id="RegisterPerson_lastName" maxlength="60" size="40" class="required false" name="lastName"/>
+ <input type="text" autocomplete="off" id="RegisterPerson_lastName" maxlength="60" size="40" class="required false" name="lastName" value="${requestParameters.lastName?if_exists}"/>
  <span class="tooltip">Required</span>    
  </td>
      </tr>
     <tr>
     <td class="label"> Email    </td>
     <td>
- <input type="text" autocomplete="off" id="RegisterPerson_USER_EMAIL" maxlength="250" size="60" class="required false" name="USER_EMAIL"/>
+ <input type="text" autocomplete="off" id="RegisterPerson_USER_EMAIL" maxlength="250" size="60" class="required false" name="USER_EMAIL" value="${requestParameters.USER_EMAIL?if_exists}"/>
  <span class="tooltip">Required</span>    
  </td>
     </tr>
@@ -54,21 +54,21 @@
     <tr>
     <td class="label"> Username    </td>
     <td>
- <input type="text" autocomplete="off" id="RegisterPerson_USERNAME" maxlength="250" size="30" class="required false" name="USERNAME"/>
+ <input type="text" autocomplete="off" id="RegisterPerson_USERNAME" maxlength="250" size="30" class="required false" name="USERNAME" value="${requestParameters.USERNAME?if_exists}"/>
  <span class="tooltip">Required</span>    
  </td>
     </tr>
     <tr>
      <td class="label"> Password    </td>
     <td>
- <input type="password" id="RegisterPerson_PASSWORD" maxlength="250" size="15" name="PASSWORD" class="required false"/>
+ <input type="password" id="RegisterPerson_PASSWORD" maxlength="250" size="15" name="PASSWORD" class="required false" value="${requestParameters.PASSWORD?if_exists}"/>
  <span class="tooltip">Required</span>    
  </td>
     </tr>
     <tr>
     <td class="label"> Password    </td>
     <td>
- <input type="password" id="RegisterPerson_CONFIRM_PASSWORD" maxlength="250" size="15" name="CONFIRM_PASSWORD" class="required false"/>
+ <input type="password" id="RegisterPerson_CONFIRM_PASSWORD" maxlength="250" size="15" name="CONFIRM_PASSWORD" class="required false" value="${requestParameters.CONFIRM_PASSWORD?if_exists}"/>
  <span class="tooltip">* Confirm</span>    
  </td>
     </tr>