svn commit: r688305 - in /ofbiz/trunk/applications/ecommerce/webapp/ecommerce: WEB-INF/ customer/profile/ images/

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

svn commit: r688305 - in /ofbiz/trunk/applications/ecommerce/webapp/ecommerce: WEB-INF/ customer/profile/ images/

mor-2
Author: mor
Date: Sat Aug 23 05:36:23 2008
New Revision: 688305

URL: http://svn.apache.org/viewvc?rev=688305&view=rev
Log:
Done following changes to new profile and customer pages:
1) Addressed deprecated style <inputBox> and useless <span> tags as per Adrian's suggestion,
2) Added client validation for email and telecom number on new customer and edit profile pages,
3) Few misc. cleanups.

Thanks to Sumit Pandit, Brajesh Patel, Rishi Solanki and Santosh Malviya for this contribution.

Just a side note - There is a continuous effort from all contributors (names as mentioned above) to do improvement in this work.


Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditProfile.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Sat Aug 23 05:36:23 2008
@@ -1702,13 +1702,11 @@
     <request-map uri="editProfile">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditProfile"/>
-        <response name="error" type="view" value="EditProfile"/>
     </request-map>
 
     <request-map uri="manageAddress">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ManageAddress"/>
-        <response name="error" type="view" value="ManageAddress"/>
     </request-map>
 
     <request-map uri="createCustomerProfile">

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl Sat Aug 23 05:36:23 2008
@@ -48,76 +48,70 @@
   </#list>
   <div class="screenlet-body">
     <div class="form-row">
-      <span>${uiLabelMap.PartyAddressLine1}*</span>
+      <label>${uiLabelMap.PartyAddressLine1}*</label>
       <span>
-        <input type="text" class="left inputBox required" name="address1" id="address1_${contactMech.contactMechId}" value="${postalAddress.address1?if_exists}" style="width: 50%" size="30" maxlength="30">
+        <input type="text" class="left required" name="address1" id="address1_${contactMech.contactMechId}" value="${postalAddress.address1?if_exists}" style="width: 50%" size="30" maxlength="30">
         <span id="advice-required-address1_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
       </span>
     </div>
     <div class="form-row">
-      <span>${uiLabelMap.PartyAddressLine2}</span>
+      <label>${uiLabelMap.PartyAddressLine2}</label>
       <span>
-        <input type="text" class="left inputBox" name="address2" value="${postalAddress.address2?if_exists}" style="width: 50%" size="30" maxlength="30">    
+        <input type="text" class="left" name="address2" value="${postalAddress.address2?if_exists}" style="width: 50%" size="30" maxlength="30">    
       </span>
     </div>
     <div class="form-row">
-      <span>${uiLabelMap.PartyCity}*</span>
+      <label>${uiLabelMap.PartyCity}*</label>
       <span>
-        <input type="text" class="left inputBox required" name="city" id="city_${contactMech.contactMechId}" value="${postalAddress.city?if_exists}" size="30" maxlength="30">
+        <input type="text" class="left required" name="city" id="city_${contactMech.contactMechId}" value="${postalAddress.city?if_exists}" size="30" maxlength="30">
         <span id="advice-required-city_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
       </span>
     </div>
     <div class="form-row">
-      <span>${uiLabelMap.PartyZipCode}*</span>
+      <label>${uiLabelMap.PartyZipCode}*</label>
       <span>
-        <input type="text" class="left inputBox required" name="postalCode" id="postalCode_${contactMech.contactMechId}" value="${postalAddress.postalCode?if_exists}" size="12" maxlength="10">
+        <input type="text" class="left required" name="postalCode" id="postalCode_${contactMech.contactMechId}" value="${postalAddress.postalCode?if_exists}" size="12" maxlength="10">
         <span id="advice-required-postalCode_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
       </span>
     </div>
     <div class="form-row">
-      <span>${uiLabelMap.PartyCountry}*</span>
+      <label>${uiLabelMap.PartyState}*</label>
       <span>
-        <select name="countryGeoId" id="countryGeoId_${contactMech.contactMechId}" class="left selectBox required" style="width: 70%">
-          <#if postalAddress.countryGeoId?exists>
-            <option value='${postalAddress.countryGeoId}'>${selectedCountryName?default(postalAddress.countryGeoId)}</option>
+        <select name="stateProvinceGeoId" id="stateProvinceGeoId_${contactMech.contactMechId}" class="left required" style="width: 70%">
+          <#if postalAddress.stateProvinceGeoId?exists>
+            <option value='${postalAddress.stateProvinceGeoId}'>${selectedStateName?default(postalAddress.stateProvinceGeoId)}</option>
           </#if>
-          ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+          <option value="">${uiLabelMap.PartyNoState}</option>
+          ${screens.render("component://common/widget/CommonScreens.xml#states")}
         </select>
-        <span id="advice-required-countryGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
+        <span id="advice-required-stateProvinceGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
       </span>
     </div>
     <div class="form-row">
-      <span>${uiLabelMap.PartyState}*</span>
+      <label>${uiLabelMap.PartyCountry}*</label>
       <span>
-        <select name="stateProvinceGeoId" id="stateProvinceGeoId_${contactMech.contactMechId}" class="left selectBox required" style="width: 70%">
-          <#if postalAddress.stateProvinceGeoId?exists>
-            <option value='${postalAddress.stateProvinceGeoId}'>${selectedStateName?default(postalAddress.stateProvinceGeoId)}</option>
+        <select name="countryGeoId" id="countryGeoId_${contactMech.contactMechId}" class="left required" style="width: 70%">
+          <#if postalAddress.countryGeoId?exists>
+            <option value='${postalAddress.countryGeoId}'>${selectedCountryName?default(postalAddress.countryGeoId)}</option>
           </#if>
-          <option value="">${uiLabelMap.PartyNoState}</option>
-          ${screens.render("component://common/widget/CommonScreens.xml#states")}
+          ${screens.render("component://common/widget/CommonScreens.xml#countries")}
         </select>
-        <span id="advice-required-stateProvinceGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
+        <span id="advice-required-countryGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
       </span>
     </div>
 
     <#if telecomNumber?has_content>
       <#assign pcm = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(telecomNumber.getRelated("PartyContactMech"))/>
       <div class="form-row">
-        <h3>${uiLabelMap.PartyPhoneNumber}</h3>
         <div class="field-label">
-          <label for="countryCode_${telecomNumber.contactMechId}">${uiLabelMap.PartyCountry}<span>*</span>
-            <span id="advice-required-countryCode_${telecomNumber.contactMechId}" style="display:none" class="errorMessage">(required)</span>
-          </label>
-          <label for="areaCode_${telecomNumber.contactMechId}">${uiLabelMap.PartyAreaCode}<span>*</span><span id="advice-required-areaCode_${telecomNumber.contactMechId}" style="display:none" class="errorMessage">(required)</span></label>
-          <label for="contactNumber_${telecomNumber.contactMechId}">${uiLabelMap.PartyContactNumber}<span>*</span><span id="advice-required-contactNumber_${telecomNumber.contactMechId}" style="display:none" class="errorMessage">(required)</span></label>
-          <label for="extension_${telecomNumber.contactMechId}">${uiLabelMap.PartyExtension}</label>
+          <label for="phoneNumber_${telecomNumber.contactMechId}">${uiLabelMap.PartyPhoneNumber}*</label>
         </div>
-        <div class="field-widget">
+        <div>
           <input type="hidden" name="phoneContactMechId" value="${telecomNumber.contactMechId?if_exists}"/>
-          <input type="text" name="countryCode" id="countryCode_${telecomNumber.contactMechId}" class="inputBox required" value="${telecomNumber.countryCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="areaCode" id="areaCode_${telecomNumber.contactMechId}" class="inputBox required" value="${telecomNumber.areaCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="contactNumber" id="contactNumber_${telecomNumber.contactMechId}" class="inputBox required" value="${contactNumber?default("${telecomNumber.contactNumber?if_exists}")}" size="6" maxlength="7"/>
-          - <input type="text" name="extension" id="extension_${telecomNumber.contactMechId}" class="inputBox" value="${extension?default("${pcm.extension?if_exists}")}" size="3" maxlength="3"/>
+          <input type="text" name="countryCode" id="countryCode_${telecomNumber.contactMechId}" class="required" value="${telecomNumber.countryCode?if_exists}" size="3" maxlength="3"/>
+          - <input type="text" name="areaCode" id="areaCode_${telecomNumber.contactMechId}" class="required" value="${telecomNumber.areaCode?if_exists}" size="3" maxlength="3"/>
+          - <input type="text" name="contactNumber" id="contactNumber_${telecomNumber.contactMechId}" class="required" value="${contactNumber?default("${telecomNumber.contactNumber?if_exists}")}" size="6" maxlength="7"/>
+          - <input type="text" name="extension" id="extension_${telecomNumber.contactMechId}" value="${extension?default("${pcm.extension?if_exists}")}" size="3" maxlength="3"/>
         </div>
       </div>    
     </#if>
@@ -139,7 +133,7 @@
     </#if>
 
     <div class="form-row">
-      <a name="submitEditPostalAddress_${contactMech.contactMechId}" id="submitEditPostalAddress_${contactMech.contactMechId}" class="buttontext" onclick="updatePartyPostalAddress('submitEditPostalAddress_${contactMech.contactMechId}')">${uiLabelMap.CommonSave}</a>
+      <a name="submitEditPostalAddress_${contactMech.contactMechId}" id="submitEditPostalAddress_${contactMech.contactMechId}" class="buttontext" onclick="updatePartyPostalAddress('submitEditPostalAddress_${contactMech.contactMechId}')">${uiLabelMap.CommonSubmit}</a>
       <form action="">
         <input class="popup_closebox buttontext" type="button" value="${uiLabelMap.CommonClose}"/>
       </form>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditProfile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditProfile.ftl?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditProfile.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditProfile.ftl Sat Aug 23 05:36:23 2008
@@ -19,7 +19,7 @@
 
 <div id="form-container" class="screenlet">
   <div class="screenlet-header">
-    <div class='boxhead'>&nbsp;${uiLabelMap.CommonEdit} ${uiLabelMap.CommonProfile}</div>
+    <div class='boxhead'>&nbsp;${uiLabelMap.EcommerceMyAccount}</div>
   </div>
   <div class="screenlet-body">
     <form id="editUserForm" name="editUserForm" method="post" action="<@ofbizUrl>updateCustomerProfile</@ofbizUrl>">
@@ -31,15 +31,21 @@
         <div class="screenlet-body">
           <div class="form-row">
             <div class="field-label"><label for="firstName">${uiLabelMap.PartyFirstName}*<span id="advice-required-firstName" style="display: none" class="errorMessage">(required)</span></label></div>
-            <div class="field-widget"><input type="text" name="firstName" id="firstName" class="inputBox required" value="${parameters.firstName?if_exists}" size="30" maxlength="30"></div>
+            <div class="form-field"><input type="text" name="firstName" id="firstName" class="required" value="${parameters.firstName?if_exists}" size="30" maxlength="30"></div>
           </div>
           <div class="form-row">
             <div class="field-label"><label for="lastName">${uiLabelMap.PartyLastName}*<span id="advice-required-lastName" style="display: none" class="errorMessage">(required)</span></label></div>
-            <div class="field-widget"><input type="text" name="lastName" id="lastName" class="inputBox required" value="${parameters.lastName?if_exists}" size="30" maxlength="30"></div>
+            <div class="form-field"><input type="text" name="lastName" id="lastName" class="required" value="${parameters.lastName?if_exists}" size="30" maxlength="30"></div>
           </div>
           <div class="form-row">
-            <div class="field-label"><label for="emailAddress">${uiLabelMap.PartyEmailAddress}*<span id="advice-required-emailAddress" style="display: none" class="errorMessage">(required)</span></label></div>
-            <div class="field-widget"><input type="text" class="inputBox required" name="emailAddress" id="emailAddress" value="${parameters.emailAddress?if_exists}" size="30" maxlength="255"/></div>
+            <div class="field-label">
+              <label for="emailAddress">
+                ${uiLabelMap.CommonEmail}*
+                <span id="advice-required-emailAddress" style="display: none" class="errorMessage">(required)</span>
+                <span id="advice-validate-email-emailAddress" class="errorMessage" style="display:none">Please enter a valid email address. For example [hidden email] .</span>
+              </label>
+            </div>
+            <div class="form-field"><input type="text" class="required validate-email" name="emailAddress" id="emailAddress" value="${parameters.emailAddress?if_exists}" size="30" maxlength="255"/></div>
           </div>
         </div>
       </div>
@@ -49,23 +55,23 @@
         <div class="screenlet-body">
           <div class="form-row">
             <div class="field-label"><label for="userName">${uiLabelMap.CommonUsername}*</label></div>
-            <div class="field-widget"><input type="text" name="userLoginId" id="userLoginId" class="inputBox" value="${userLogin.userLoginId?if_exists}" size="30" maxlength="255" <#if userLogin.userLoginId?exists>disabled</#if>></div>
+            <div class="form-field"><input type="text" name="userLoginId" id="userLoginId" value="${userLogin.userLoginId?if_exists}" size="30" maxlength="255" <#if userLogin.userLoginId?exists>disabled</#if>></div>
           </div>
           <div class="form-row">
             <div class="field-label"><label for="currentPassword">${uiLabelMap.CommonCurrentPassword}*</label></div>
-            <div class="field-widget"><input type="password" name="currentPassword" id="currentPassword" class="inputBox" value="${parameters.currentPassword?if_exists}" size="30" maxlength="16"></div>
+            <div class="form-field"><input type="password" name="currentPassword" id="currentPassword" value="${parameters.currentPassword?if_exists}" size="30" maxlength="16"></div>
           </div>
           <div class="form-row">
             <div class="field-label"><label for="newPassword">${uiLabelMap.CommonNewPassword}*</label></div>
-            <div class="field-widget"><input type="password" name="newPassword" id="newPassword" class="inputBox" value="${parameters.newPassword?if_exists}" size="30" maxlength="16"></div>
+            <div class="form-field"><input type="password" name="newPassword" id="newPassword" value="${parameters.newPassword?if_exists}" size="30" maxlength="16"></div>
           </div>
           <div class="form-row">
             <div class="field-label"><label for="newPasswordVerify">${uiLabelMap.CommonNewPasswordVerify}*</label></div>
-            <div class="field-widget"><input type="password" name="newPasswordVerify" id="newPasswordVerify" class="inputBox" value="${parameters.passwordVerify?if_exists}" size="30" maxlength="16"></div>
+            <div class="form-field"><input type="password" name="newPasswordVerify" id="newPasswordVerify" value="${parameters.passwordVerify?if_exists}" size="30" maxlength="16"></div>
           </div>
         </div>
       </div>
-      <div class="form-row">&nbsp;&nbsp;<a id="submitEditUserForm" href="javascript:void(0);" class="buttontext">${uiLabelMap.CommonSave}</a></div>
+      <div class="form-row">&nbsp;<a id="submitEditUserForm" href="javascript:void(0);" class="buttontext">${uiLabelMap.CommonSubmit}</a></div>
     </form>
   </div>
 </div>
\ No newline at end of file

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl Sat Aug 23 05:36:23 2008
@@ -22,11 +22,12 @@
   <form id="refreshRequestForm" name="refreshRequestForm" method="post" action="<@ofbizUrl>manageAddress</@ofbizUrl>">
   </form>
 
-  <#-- Add address -->
-  <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.CommonAdd} ${uiLabelMap.CommonNew} ${uiLabelMap.CommonAddresses}</div>
-  </div>
+  <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.EcommerceAddressBook}</div></div>
   <div class="screenlet-body">
-    <a class="buttontext" id="addAddress" href="javascript:void(0)">${uiLabelMap.CommonAdd} ${uiLabelMap.OrderAddress}</a>
+    <#-- Add address -->
+    <div class="form-row" align="right">
+      <a class="buttontext" id="addAddress" href="javascript:void(0)">${uiLabelMap.CommonAdd} ${uiLabelMap.CommonNew} ${uiLabelMap.CommonAddresses}</a>
+    </div>  
     <div id="displayCreateAddressForm" class="popup" style="display: none;">
       <div id="serverError" class="errorMessage"></div>
       <form id="createPostalAddressForm" name="createPostalAddressForm" method="post" action="<@ofbizUrl></@ofbizUrl>">
@@ -35,7 +36,7 @@
         <div class="form-row">
           ${uiLabelMap.PartyAddressLine1}*
           <div class="form-field">
-            <input type="text" class="inputBox required" name="address1" id="address1" value="" size="30" maxlength="30"><span id="advice-required-address1" style="display: none" class="errorMessage">(required)</span>
+            <input type="text" class="required" name="address1" id="address1" value="" size="30" maxlength="30"><span id="advice-required-address1" style="display: none" class="errorMessage">(required)</span>
           </div>
         </div>
         <div class="form-row">
@@ -44,19 +45,19 @@
         <div class="form-row">
           ${uiLabelMap.PartyCity}*
           <div class="form-field">
-            <input type="text" class="inputBox required" name="city" id="city" value="" size="30" maxlength="30"><span id="advice-required-city" style="display: none" class="errorMessage">(required)</span>
+            <input type="text" class="required" name="city" id="city" value="" size="30" maxlength="30"><span id="advice-required-city" style="display: none" class="errorMessage">(required)</span>
           </div>
         </div>
         <div class="form-row">
           ${uiLabelMap.PartyZipCode}*
           <div class="form-field">
-            <input type="text" class="inputBox required" name="postalCode" id="postalCode" value="" size="12" maxlength="10"><span id="advice-required-postalCode" style="display: none" class="errorMessage">(required)</span>
+            <input type="text" class="required" name="postalCode" id="postalCode" value="" size="30" maxlength="10"><span id="advice-required-postalCode" style="display: none" class="errorMessage">(required)</span>
           </div>
         </div>
         <div class="form-row">
           ${uiLabelMap.PartyCountry}*
           <div class="form-field">
-            <select name="countryGeoId" id="countryGeoId" class="selectBox required" style="width: 70%">
+            <select name="countryGeoId" id="countryGeoId" class="required" style="width: 70%">
               ${screens.render("component://common/widget/CommonScreens.xml#countries")}
             </select>
             <span id="advice-required-countryGeoId" style="display: none" class="errorMessage">(required)</span>
@@ -65,7 +66,7 @@
         <div class="form-row">
           ${uiLabelMap.PartyState}*
           <div class="form-field">
-            <select name="stateProvinceGeoId" id="stateProvinceGeoId" class="selectBox required" style="width: 70%">
+            <select name="stateProvinceGeoId" id="stateProvinceGeoId" class="required" style="width: 70%">
               <option value="">${uiLabelMap.PartyNoState}</option>
               ${screens.render("component://common/widget/CommonScreens.xml#states")}
             </select>
@@ -81,7 +82,7 @@
           <input type="checkbox" name="setBillingPurpose" id="setBillingPurpose" value="Y" <#if setBillingPurpose?exists>checked</#if>/>
         </div>
         <div class="form-row">
-          <a href="javascript:void(0);" id="submitPostalAddressForm" class="buttontext" onclick="createPartyPostalAddress('submitPostalAddressForm')">${uiLabelMap.CommonSave}</a>
+          <a href="javascript:void(0);" id="submitPostalAddressForm" class="buttontext" onclick="createPartyPostalAddress('submitPostalAddressForm')">${uiLabelMap.CommonSubmit}</a>
           <form action="">
             <input class="popup_closebox buttontext" type="button" value="${uiLabelMap.CommonClose}"/>
           </form>
@@ -92,9 +93,6 @@
       new Popup('displayCreateAddressForm','addAddress', {modal: true, position: 'center', trigger: 'click'})
     </script>
   </div>
-  <br/>
-  <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.EcommerceAddressBook}</div></div>
-  <div class="screenlet-body"></div>
 
   <#-- Manage Addresses -->
   <div class="left center">
@@ -114,10 +112,8 @@
               <div class="form-field">
                 <#if showSetShippingPurpose == "N">
                   <h3>${uiLabelMap.EcommercePrimary} ${uiLabelMap.OrderShippingAddress}</h3>
-                  <span class="buttontextdisabled">${uiLabelMap.EcommerceIsDefault}</span>
                 <#else>
                   <h3>${uiLabelMap.EcommercePrimary} ${uiLabelMap.PartyBillingAddress}</h3>
-                  <span class="buttontextdisabled">${uiLabelMap.EcommerceIsDefault}</span>
                 </#if>
               </div>
             </div>
@@ -157,7 +153,6 @@
       
                     <#if telecomNumber?has_content>
                       <#assign pcm = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(telecomNumber.getRelated("PartyContactMech"))/>
-                      <h3>${uiLabelMap.PartyPhoneNumber}</h3>
                       ${telecomNumber.countryCode?if_exists}-
                       ${telecomNumber.areaCode?if_exists}-
                       ${telecomNumber.contactNumber?if_exists}-
@@ -175,7 +170,6 @@
                     
                     <#if telecomNumber?has_content>
                       <#assign pcm = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(telecomNumber.getRelated("PartyContactMech"))/>
-                      <h3>${uiLabelMap.PartyPhoneNumber}</h3>
                       ${telecomNumber.countryCode?if_exists}-
                       ${telecomNumber.areaCode?if_exists}-
                       ${telecomNumber.contactNumber?if_exists}-

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl Sat Aug 23 05:36:23 2008
@@ -17,53 +17,55 @@
 under the License.
 -->
 
-<div id="form-container">
+<div class="screenlet">
+  <div class="screenlet-header">
+    <div class='boxhead'>&nbsp;${uiLabelMap.EcommerceMyAccount}</div>
+  </div>
+  <div class="screenlet-body">
   <form id="newUserForm" name="newUserForm" method="post" action="<@ofbizUrl>createCustomerProfile</@ofbizUrl>">
     <input type="hidden" name="roleTypeId" value="CUSTOMER"/>
     <input type="hidden" name="emailContactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
     <#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request)/>
     <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/>
 
-    <div><h1>${uiLabelMap.PartyRequestNewAccount}</h1></div>
-
     <div class="left center">
       <div class="screenlet-header"><div class='boxhead'>&nbsp;${uiLabelMap.PartyContactInformation}</div></div>
       <div class="form-row">
         <div class="field-label"><label for="firstName">${uiLabelMap.PartyFirstName}*<span id="advice-required-firstName" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget"><input type="text" name="firstName" id="firstName" class="inputBox required" value="${parameters.firstName?if_exists}" size="30" maxlength="30"></div>
+        <div class="form-field"><input type="text" name="firstName" id="firstName" class="required" value="${parameters.firstName?if_exists}" size="30" maxlength="30"></div>
       </div>
       <div class="form-row">
         <div class="field-label"><label for="lastName">${uiLabelMap.PartyLastName}*<span id="advice-required-lastName" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget"><input type="text" name="lastName" id="lastName" class="inputBox required" value="${parameters.lastName?if_exists}" size="30" maxlength="30"></div>
+        <div class="form-field"><input type="text" name="lastName" id="lastName" class="required" value="${parameters.lastName?if_exists}" size="30" maxlength="30"></div>
       </div>
       <div class="form-row">
-        <div class="field-label"><label for="emailAddress">${uiLabelMap.PartyEmailAddress}*<span id="advice-required-emailAddress" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget"><input type="text" class="inputBox required" name="emailAddress" id="emailAddress" value="${parameters.emailAddress?if_exists}" size="30" maxlength="255"/></div>
+        <div class="field-label">
+          <label for="emailAddress">${uiLabelMap.CommonEmail}*
+            <span id="advice-required-emailAddress" style="display: none" class="errorMessage">(required)</span>
+          </label>
+        </div>
+        <div class="form-field"><input type="text" class="required validate-email" name="emailAddress" id="emailAddress" value="${parameters.emailAddress?if_exists}" size="30" maxlength="255"/></div>
       </div>
     </div>
-
     <div class="center right">
       <div class="screenlet-header"><div class='boxhead'>&nbsp;${uiLabelMap.AccountInformation}</div></div>
       <div id="userNameAndPasswordPanel">
         <div class="form-row">
           <div class="field-label"><label for="userName">${uiLabelMap.CommonUsername}*<span id="advice-required-username" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget"><input type="text" name="username" id="username" class="inputBox required" value="${parameters.username?if_exists}" size="30" maxlength="255"></div>
+          <div class="form-field"><input type="text" name="username" id="username" class="required" value="${parameters.username?if_exists}" size="30" maxlength="255"></div>
         </div>
         <div class="form-row">
           <div class="field-label"><label for="password">${uiLabelMap.CommonPassword}*<span id="advice-required-password" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget"><input type="password" name="password" id="password" class="inputBox required" value="${parameters.password?if_exists}" maxlength="16"></div>
+          <div class="form-field"><input type="password" name="password" id="password" class="required" value="${parameters.password?if_exists}" maxlength="16"></div>
         </div>
         <div class="form-row">
           <div class="field-label"><label for="passwordVerify">${uiLabelMap.CommonConfirm} ${uiLabelMap.CommonPassword}*<span id="advice-required-passwordVerify" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget"><input type="password" name="passwordVerify" id="passwordVerify" class="inputBox required" value="${parameters.passwordVerify?if_exists}" maxlength="16"></div>
-        </div>
-        <div class="form-row">
-          <div class="field-label"><label for="currentPassword">${uiLabelMap.FormFieldTitle_passwordHint}</label></div>
-          <div class="field-widget"><input type="text" name="passwordHint" id="passwordHintId" class="inputBox" value="${parameters.passwordHint?if_exists}" maxlength="16"></div>
+          <div class="form-field"><input type="password" name="passwordVerify" id="passwordVerify" class="required" value="${parameters.passwordVerify?if_exists}" maxlength="16"></div>
         </div>
       </div>
     </div>
-
+    <div class="form-row"></div>
+    <span id="advice-validate-email-emailAddress" class="errorMessage" style="display:none">${uiLabelMap.PartyEmailAddressNotFormattedCorrectly}</span>
     <div class="form-row"><hr class="sepbar"/></div>
     <div class="bothclear"></div>    
 
@@ -71,19 +73,23 @@
       <div class="screenlet-header"><div class='boxhead'>&nbsp;${uiLabelMap.OrderShippingInformation}</div></div>
       <div class="form-row">
         <div class="field-label"><label for="shipToAddress1">${uiLabelMap.PartyAddressLine1}*<span id="advice-required-shipToAddress1" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget"><input type="text" name="shipToAddress1" id="shipToAddress1" class="inputBox required" value="${parameters.shipToAddress1?if_exists}"/></div>
+        <div class="form-field"><input type="text" name="shipToAddress1" id="shipToAddress1" class="required" value="${parameters.shipToAddress1?if_exists}"/></div>
       </div>  
       <div class="form-row">
         <div class="field-label"><label for="shipToAddress2">${uiLabelMap.PartyAddressLine2}</label></div>
-        <div class="field-widget"><input type="text" name="shipToAddress2" id="shipToAddress2" class="inputBox" value="${parameters.shipToAddress2?if_exists}"/></div>
+        <div class="form-field"><input type="text" name="shipToAddress2" id="shipToAddress2" value="${parameters.shipToAddress2?if_exists}"/></div>
       </div>  
       <div class="form-row">
         <div class="field-label"><label for="shipToCity">${uiLabelMap.CommonCity}*<span id="advice-required-shipToCity" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget"><input type="text" name="shipToCity" id="shipToCity" class="inputBox required" value="${parameters.shipToCity?if_exists}"/></div>
-      </div>  
+        <div class="form-field"><input type="text" name="shipToCity" id="shipToCity" class="required" value="${parameters.shipToCity?if_exists}"/></div>
+      </div>
+      <div class="form-row">
+        <div class="field-label"><label for="shipToPostalCode">${uiLabelMap.PartyZipCode}*<span id="advice-required-shipToPostalCode" style="display: none" class="errorMessage">(required)</span></label></div>
+        <div class="form-field"><input type="text" name="shipToPostalCode" id="shipToPostalCode" class="required" value="${parameters.shipToPostalCode?if_exists}"/></div>
+      </div>
       <div class="form-row">
         <div class="field-label"><label for="shipToStateProvinceGeoId">${uiLabelMap.CommonState}*<span id="advice-required-shipToStateProvinceGeoId" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget">
+        <div class="form-field">
           <select name="shipToStateProvinceGeoId" id="shipToStateProvinceGeoId" class='selectBox'>
             <#if parameters.shipToStateProvinceGeoId?exists><option>${parameters.shipToStateProvinceGeoId?if_exists}</option></#if>
             ${screens.render("component://common/widget/CommonScreens.xml#states")}
@@ -91,12 +97,8 @@
         </div>
       </div>  
       <div class="form-row">
-        <div class="field-label"><label for="shipToPostalCode">${uiLabelMap.PartyZipCode}*<span id="advice-required-shipToPostalCode" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget"><input type="text" name="shipToPostalCode" id="shipToPostalCode" class="inputBox required" value="${parameters.shipToPostalCode?if_exists}"/></div>
-      </div>  
-      <div class="form-row">
         <div class="field-label"><label for="shipToCountryGeoId">${uiLabelMap.PartyCountry}*<span id="advice-required-shipToCountryGeoId" style="display: none" class="errorMessage">(required)</span></label></div>
-        <div class="field-widget">
+        <div class="form-field">
           <select name="shipToCountryGeoId" id="shipToCountryGeoId" class='selectBox'>
             <#if parameters.shipToCountryGeoId?exists><option>${parameters.shipToCountryGeoId?if_exists}</option></#if>
             ${screens.render("component://common/widget/CommonScreens.xml#countries")}
@@ -105,20 +107,21 @@
       </div>  
       <div class="form-row">
         <div class="field-label">
-          <label for="shipToCountryCode">${uiLabelMap.PartyCountry}<span>*</span><span id="advice-required-shipToCountryCode" style="display:none" class="errorMessage">(required)</span></label>
-          <label for="shipToAreaCode">${uiLabelMap.PartyAreaCode}<span>*</span><span id="advice-required-shipToAreaCode" style="display:none" class="errorMessage">(required)</span></label>
-          <label for="shipToContactNumber">${uiLabelMap.PartyContactNumber}<span>*</span><span id="advice-required-shipToContactNumber" style="display:none" class="errorMessage">(required)</span></label>
-          <label for="shipToExtension">${uiLabelMap.PartyExtension}</label>
-        </div>
-        <div class="field-widget">
-          <input type="text" name="shipToCountryCode" id="shipToCountryCode" class="inputBox required" value="${parameters.countryCode?if_exists}" size="3"  maxlength="3"/>
-          - <input type="text" name="shipToAreaCode" id="shipToAreaCode" class="inputBox required" value="${parameters.areaCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="shipToContactNumber" id="shipToContactNumber" class="inputBox required" value="${contactNumber?default("${parameters.contactNumber?if_exists}")}" size="6" maxlength="7"/>
-          - <input type="text" name="shipToExtension" id="shipToExtension" class="inputBox" value="${extension?default("${parameters.extension?if_exists}")}" size="3" maxlength="3"/>
+          <label>${uiLabelMap.PartyPhoneNumber}*</label>
+          <span id="advice-required-shipToCountryCode" style="display:none" class="errorMessage"></span>
+          <span id="advice-required-shipToAreaCode" style="display:none" class="errorMessage"></span>
+          <span id="advice-required-shipToContactNumber" style="display:none" class="errorMessage"></span>
+        </div>
+        <div id="shipToPhoneRequired" style="display: none;" class="errorMessage">(required)</div>
+        <div class="form-field">
+          <input type="text" name="shipToCountryCode" id="shipToCountryCode" class="required" value="${parameters.countryCode?if_exists}" size="3" maxlength="3"/>
+          - <input type="text" name="shipToAreaCode" id="shipToAreaCode" class="required" value="${parameters.areaCode?if_exists}" size="3" maxlength="3"/>
+          - <input type="text" name="shipToContactNumber" id="shipToContactNumber" class="required" value="${contactNumber?default("${parameters.contactNumber?if_exists}")}" size="6" maxlength="7"/>
+          - <input type="text" name="shipToExtension" id="shipToExtension" value="${extension?default("${parameters.extension?if_exists}")}" size="3" maxlength="3"/>
         </div>
       </div>
       <div class="form-row">
-        <div class="field-widget"><input type="checkbox" class="checkbox" name="useShippingAddressForBilling" id="useShippingAddressForBilling" value="Y" <#if parameters.useShippingAddressForBilling?has_content && parameters.useShippingAddressForBilling?default("")=="Y">checked</#if>/>&nbsp;&nbsp;${uiLabelMap.FacilityBillingAddressSameShipping}</div>
+        <div class="form-field"><input type="checkbox" class="checkbox" name="useShippingAddressForBilling" id="useShippingAddressForBilling" value="Y" <#if parameters.useShippingAddressForBilling?has_content && parameters.useShippingAddressForBilling?default("")=="Y">checked</#if>/>&nbsp;&nbsp;${uiLabelMap.FacilityBillingAddressSameShipping}</div>
       </div>  
     </div>
 
@@ -127,19 +130,23 @@
       <div id="billingAddress">
         <div class="form-row">
           <div class="field-label"><label for="billToAddress1">${uiLabelMap.PartyAddressLine1}*<span id="advice-required-billToAddress1" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget"><input type="text" name="billToAddress1" id="billToAddress1" class="inputBox required" value="${parameters.billToAddress1?if_exists}"/></div>
+          <div class="form-field"><input type="text" name="billToAddress1" id="billToAddress1" class="required" value="${parameters.billToAddress1?if_exists}"/></div>
         </div>  
         <div class="form-row">
           <div class="field-label"><label for="billToAddress2">${uiLabelMap.PartyAddressLine2}</label></div>
-          <div class="field-widget"><input type="text" name="billToAddress2" id="billToAddress2" class="inputBox" value="${parameters.billToAddress2?if_exists}"/></div>
+          <div class="form-field"><input type="text" name="billToAddress2" id="billToAddress2" value="${parameters.billToAddress2?if_exists}"/></div>
         </div>  
         <div class="form-row">
           <div class="field-label"><label for="billToCity">${uiLabelMap.CommonCity}*<span id="advice-required-billToCity" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget"><input type="text" name="billToCity" id="billToCity" class="inputBox required" value="${parameters.billToCity?if_exists}"/></div>
-        </div>  
+          <div class="form-field"><input type="text" name="billToCity" id="billToCity" class="required" value="${parameters.billToCity?if_exists}"/></div>
+        </div>
+        <div class="form-row">
+          <div class="field-label"><label for="billToPostalCode">${uiLabelMap.PartyZipCode}*<span id="advice-required-billToPostalCode" style="display: none" class="errorMessage">(required)</span></label></div>
+          <div class="form-field"><input type="text" name="billToPostalCode" id="billToPostalCode" class="required" value="${parameters.billToPostalCode?if_exists}"/></div>
+        </div>
         <div class="form-row">
           <div class="field-label"><label for="billToStateProvinceGeoId">${uiLabelMap.CommonState}*<span id="advice-required-billToStateProvinceGeoId" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget">
+          <div class="form-field">
             <select name="billToStateProvinceGeoId" id="billToStateProvinceGeoId" class="selectBox required">
               <#if parameters.billToStateProvinceGeoId?exists><option>${parameters.billToStateProvinceGeoId?if_exists}</option></#if>
               ${screens.render("component://common/widget/CommonScreens.xml#states")}
@@ -147,12 +154,8 @@
           </div>
         </div>
         <div class="form-row">
-          <div class="field-label"><label for="billToPostalCode">${uiLabelMap.PartyZipCode}*<span id="advice-required-billToPostalCode" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget"><input type="text" name="billToPostalCode" id="billToPostalCode" class="inputBox required" value="${parameters.billToPostalCode?if_exists}"/></div>
-        </div>  
-        <div class="form-row">
           <div class="field-label"><label for="billToCountryGeoId">${uiLabelMap.PartyCountry}*<span id="advice-required-billToCountryGeoId" style="display: none" class="errorMessage">(required)</span></label></div>
-          <div class="field-widget">
+          <div class="form-field">
             <select name="billToCountryGeoId" id="billToCountryGeoId" class="selectBox required">
               <#if parameters.billToCountryGeoId?exists><option>${parameters.billToCountryGeoId?if_exists}</option></#if>
               ${screens.render("component://common/widget/CommonScreens.xml#countries")}
@@ -161,22 +164,24 @@
         </div>
         <div class="form-row">
           <div class="field-label">
-            <label for="billToCountryCode">${uiLabelMap.PartyCountry}<span>*</span><span id="advice-required-billToCountryCode" style="display:none" class="errorMessage">(required)</span></label>
-            <label for="billToAreaCode">${uiLabelMap.PartyAreaCode}<span>*</span><span id="advice-required-billToAreaCode" style="display:none" class="errorMessage">(required)</span></label>
-            <label for="billToContactNumber">${uiLabelMap.PartyContactNumber}<span>*</span><span id="advice-required-billToContactNumber" style="display:none" class="errorMessage">(required)</span></label>
-            <label for="billToExtension">${uiLabelMap.PartyExtension}</label>
+            <label>${uiLabelMap.PartyPhoneNumber}*</label>
+            <span id="advice-required-billToCountryCode" style="display:none" class="errorMessage"></span>
+            <span id="advice-required-billToAreaCode" style="display:none" class="errorMessage"></span>
+            <span id="advice-required-billToContactNumber" style="display:none" class="errorMessage"></span>
           </div>
-          <div class="field-widget">
-            <input type="text" name="billToCountryCode" id="billToCountryCode" class="inputBox required" value="${parameters.countryCode?if_exists}" size="3"  maxlength="3"/>
-            - <input type="text" name="billToAreaCode" id="billToAreaCode" class="inputBox required" value="${parameters.areaCode?if_exists}" size="3" maxlength="3"/>
-            - <input type="text" name="billToContactNumber" id="billToContactNumber" class="inputBox required" value="${contactNumber?default("${parameters.contactNumber?if_exists}")}" size="6" maxlength="7"/>
-            - <input type="text" name="billToExtension" id="billToExtension" class="inputBox" value="${extension?default("${parameters.extension?if_exists}")}" size="3" maxlength="3"/>
+          <div id="billToPhoneRequired" style="display: none;" class="errorMessage">(required)</div>
+          <div class="form-field">
+            <input type="text" name="billToCountryCode" id="billToCountryCode" class="required" value="${parameters.countryCode?if_exists}" size="3" maxlength="3"/>
+            - <input type="text" name="billToAreaCode" id="billToAreaCode" class="required" value="${parameters.areaCode?if_exists}" size="3" maxlength="3"/>
+            - <input type="text" name="billToContactNumber" id="billToContactNumber" class="required" value="${contactNumber?default("${parameters.contactNumber?if_exists}")}" size="6" maxlength="7"/>
+            - <input type="text" name="billToExtension" id="billToExtension" value="${extension?default("${parameters.extension?if_exists}")}" size="3" maxlength="3"/>
           </div>
         </div>
       </div>  
     </div>
 
     <div class="bothclear"></div>
-    <div class="form-row">&nbsp;&nbsp;<a id="submitNewUserForm" href="javascript:void(0);" class="buttontext">${uiLabelMap.CommonSave}</a></div>
+    <div class="form-row">&nbsp;&nbsp;<a id="submitNewUserForm" href="javascript:void(0);" class="buttontext">${uiLabelMap.CommonSubmit}</a></div>
   </form>
+  </div>
 </div>
\ No newline at end of file

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl Sat Aug 23 05:36:23 2008
@@ -19,19 +19,19 @@
 
 <div class="screenlet">
   <div class="screenlet-header">
-    <div class="boxhead">&nbsp; ${uiLabelMap.EcommerceMyAccount}</div>
+    <div class="boxhead">&nbsp;${uiLabelMap.EcommerceMyAccount}</div>
   </div>
   <div class="screenlet-body">
     <div align="right"><a class="buttontext" href="<@ofbizUrl>editProfile</@ofbizUrl>">${uiLabelMap.CommonEdit} ${uiLabelMap.CommonProfile}</a>&nbsp;</div><br/>
     <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.PartyContactInformation}</div></div>
     <div class="screenlet-body">
-      <div class="tabletext"><h3>${uiLabelMap.PartyName}</h3></div>
-      <div class="form-row">${parameters.firstName?if_exists} ${parameters.lastName?if_exists}</div>
+      <div class="form-row">
+        <div class="form-field">${parameters.firstName?if_exists} ${parameters.lastName?if_exists}</div>
+      </div>
 
       <#assign emailContactMech = delegator.findOne("ContactMech", Static["org.ofbiz.base.util.UtilMisc"].toMap("contactMechId", parameters.emailContactMechId), true)>
       <#assign emailContactMechType = emailContactMech.getRelatedOneCache("ContactMechType")>
 
-      <div class="tabletext"><h3>${emailContactMechType.description?if_exists}</h3></div>
       <div class="form-row">
         <input type="hidden" id="updatedEmailContactMechId" name="emailContactMechId" value="${parameters.emailContactMechId}">
         <input type="hidden" id="updatedEmailAddress" name="updatedEmailAddress" value="${parameters.emailAddress}">
@@ -46,8 +46,8 @@
     <div class="screenlet-body">
       <div align="right"><a class="buttontext" href="<@ofbizUrl>manageAddress</@ofbizUrl>">${uiLabelMap.EcommerceManage} ${uiLabelMap.CommonAddresses}</a>&nbsp;</div>
       <div class="left center">
+        <div class="screenlet-header"><div class='boxhead'>${uiLabelMap.EcommercePrimary} ${uiLabelMap.OrderShippingAddress}</div></div>
         <div class="screenlet-body">
-          <h3>${uiLabelMap.OrderShippingAddress}</h3>
           <#if parameters.shipToContactMechId?exists>
             ${parameters.shipToAddress1?if_exists}<br/>
             ${parameters.shipToAddress2?if_exists}<br/>
@@ -62,7 +62,6 @@
             </#if>
             <#if telecomNumber?has_content>
               <#assign pcm = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(telecomNumber.getRelated("PartyContactMech"))/>
-              <h3>${uiLabelMap.PartyPhoneNumber}</h3>
               ${telecomNumber.countryCode?if_exists}-
               ${telecomNumber.areaCode?if_exists}-
               ${telecomNumber.contactNumber?if_exists}-
@@ -75,8 +74,8 @@
       </div>
 
       <div class="center right">
+        <div class="screenlet-header"><div class='boxhead'>&nbsp;${uiLabelMap.EcommercePrimary} ${uiLabelMap.PartyBillingAddress}</div></div>
         <div class="screenlet-body">
-          <h3>${uiLabelMap.PartyBillingAddress}</h3>
           <#if parameters.billToContactMechId?exists>
             ${parameters.billToAddress1?if_exists}<br/>
             ${parameters.billToAddress2?if_exists}<br/>
@@ -91,7 +90,6 @@
             </#if>
             <#if telecomNumber?has_content>
               <#assign pcm = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(telecomNumber.getRelated("PartyContactMech"))/>
-              <h3>${uiLabelMap.PartyPhoneNumber}</h3>
               ${telecomNumber.countryCode?if_exists}-
               ${telecomNumber.areaCode?if_exists}-
               ${telecomNumber.contactNumber?if_exists}-

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js?rev=688305&r1=688304&r2=688305&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js Sat Aug 23 05:36:23 2008
@@ -4,7 +4,7 @@
 Event.observe(window, 'load', function() {
     if ($('newUserForm')) {
         validateNewUser = new Validation('newUserForm', {immediate: true, onSubmit: false});
-        Event.observe($('emailAddress'), 'blur', setUserNameFromEmail);
+        Event.observe($('emailAddress'), 'change', setUserNameFromEmail);
         Event.observe('useShippingAddressForBilling', 'click', useShippingAddressAsBillingToggle);
         Event.observe($('submitNewUserForm'), 'click', submitValidNewUser);
     }
@@ -21,9 +21,49 @@
     if ($('submitPostalAddressForm')) {
         Event.observe($('submitPostalAddressForm'), 'click', submitValidPostalAddress);
     }
+
+    if ($('shipToPhoneRequired')) {
+        Event.observe($('shipToCountryCode'), 'blur', function() {
+            validatePhoneNumber('shipToPhoneRequired', 'shipToCountryCode', 'shipToAreaCode', 'shipToContactNumber');
+        });
+        Event.observe($('shipToAreaCode'), 'blur', function() {
+            validatePhoneNumber('shipToPhoneRequired', 'shipToAreaCode', 'shipToCountryCode', 'shipToContactNumber');
+        });
+        Event.observe($('shipToContactNumber'), 'blur', function() {
+            validatePhoneNumber('shipToPhoneRequired', 'shipToContactNumber', 'shipToCountryCode', 'shipToAreaCode');
+        });
+    }
+    if ($('billToPhoneRequired')) {
+        Event.observe($('billToCountryCode'), 'blur', function() {
+            validatePhoneNumber('billToPhoneRequired', 'billToCountryCode', 'billToAreaCode', 'billToContactNumber');
+        });
+        Event.observe($('billToAreaCode'), 'blur', function() {
+            validatePhoneNumber('billToPhoneRequired', 'billToAreaCode', 'billToCountryCode', 'billToContactNumber');
+        });
+        Event.observe($('billToContactNumber'), 'blur', function() {
+            validatePhoneNumber('billToPhoneRequired', 'billToContactNumber', 'billToCountryCode', 'billToAreaCode');
+        });
+    }
 });
 
+/*
+ * This function is used for validation of Phone number with only 1 error message instead of multiple (for eg: required) on label.
+ * It takes following parameters :-  
+ * 1) errorDivId : div to display error,
+ * 2) focusedTextId : Text box, last focused,
+ * 3) textToCheck1, textToCheck2 : Other text boxes to be check.
+ */
+function validatePhoneNumber(errorDivId, focusedTextId, textToCheck1, textToCheck2) {
+    if (($(focusedTextId).value == "")) {
+        Effect.Appear(errorDivId, {duration: 0.5});
+    } else if (($(textToCheck1).value != "") && ($(textToCheck2).value != "" )) {
+       Effect.Fade(errorDivId, {duration: 0.5});
+    }
+}
+
 function submitValidNewUser() {
+ validatePhoneNumber('shipToPhoneRequired', 'shipToContactNumber', 'shipToCountryCode', 'shipToAreaCode');
+ validatePhoneNumber('billToPhoneRequired', 'billToContactNumber', 'billToCountryCode', 'billToAreaCode');
     if (validateNewUser.validate()) {
         $('newUserForm').submit();
     }