svn commit: r689783 - in /ofbiz/trunk/applications: ecommerce/config/ ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ ecommerce/webapp/ecommerce/customer/profile/ ecommerce/webapp/ecommerce/images/ ecommerce/widget/ party/script/org/ofbiz/party/co...

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

svn commit: r689783 - in /ofbiz/trunk/applications: ecommerce/config/ ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ ecommerce/webapp/ecommerce/customer/profile/ ecommerce/webapp/ecommerce/images/ ecommerce/widget/ party/script/org/ofbiz/party/co...

mor-2
Author: mor
Date: Thu Aug 28 04:12:08 2008
New Revision: 689783

URL: http://svn.apache.org/viewvc?rev=689783&view=rev
Log:
More improvements in new profile and customer pages. Thanks to Rishi Solanki, Brajesh Patel and Sumit Pandit for the contribution

Modified:
    ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.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
    ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml

Modified: ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.xml?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.xml (original)
+++ ofbiz/trunk/applications/ecommerce/config/EcommerceUiLabels.xml Thu Aug 28 04:12:08 2008
@@ -1430,6 +1430,9 @@
         <value xml:lang="th">โหลดหัวข้อที่มีอยู่</value>
         <value xml:lang="zh">可用的下载文件</value>
     </property>
+    <property key="EcommerceEditProfile">
+        <value xml:lang="en">Edit Profile</value>        
+    </property>
     <property key="EcommerceEmptyBody">
         <value xml:lang="en">Empty Body</value>
         <value xml:lang="es">Contenido vacío</value>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy Thu Aug 28 04:12:08 2008
@@ -33,11 +33,11 @@
         parameters.billToPostalCode = postalAddress.postalCode;
         parameters.billToStateProvinceGeoId = postalAddress.stateProvinceGeoId;
         parameters.billToCountryGeoId = postalAddress.countryGeoId;
-        billToStateProvinceGeo = delegator.findByPrimaryKey("Geo", [geoId : postalAddress.stateProvinceGeoId]);
+        billToStateProvinceGeo = delegator.findOne("Geo", [geoId : postalAddress.stateProvinceGeoId], false);
         if (billToStateProvinceGeo) {
             parameters.billToStateProvinceGeo = billToStateProvinceGeo.geoName;
         }
-        billToCountryProvinceGeo = delegator.findByPrimaryKey("Geo", [geoId : postalAddress.countryGeoId]);
+        billToCountryProvinceGeo = delegator.findOne("Geo", [geoId : postalAddress.countryGeoId], false);
         if (billToCountryProvinceGeo) {
             parameters.billToCountryProvinceGeo = billToCountryProvinceGeo.geoName;
         }

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy Thu Aug 28 04:12:08 2008
@@ -37,11 +37,11 @@
         parameters.shipToPostalCode = postalAddress.postalCode;
         parameters.shipToStateProvinceGeoId = postalAddress.stateProvinceGeoId;
         parameters.shipToCountryGeoId = postalAddress.countryGeoId;
-        shipToStateProvinceGeo = delegator.findByPrimaryKey("Geo", [geoId : postalAddress.stateProvinceGeoId]);
+        shipToStateProvinceGeo = delegator.findOne("Geo", [geoId : postalAddress.stateProvinceGeoId], false);
         if (shipToStateProvinceGeo) {
             parameters.shipToStateProvinceGeo =  shipToStateProvinceGeo.geoName;
         }
-        shipToCountryProvinceGeo = delegator.findByPrimaryKey("Geo", [geoId : postalAddress.countryGeoId]);
+        shipToCountryProvinceGeo = delegator.findOne("Geo", [geoId : postalAddress.countryGeoId], false);
         if (shipToCountryProvinceGeo) {
             parameters.shipToCountryProvinceGeo =  shipToCountryProvinceGeo.geoName;
         }

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl Thu Aug 28 04:12:08 2008
@@ -56,7 +56,7 @@
       <span>
         <select name="stateProvinceGeoId" id="billToStateProvinceGeoId" class="left required" style="width: 70%">
           <#if parameters.billToStateProvinceGeoId?exists>
-            <option value='${parameters.billToStateProvinceGeoId}'>${selectedStateName?default(parameters.billToStateProvinceGeoId)}</option>
+            <option value='${parameters.billToStateProvinceGeoId}'>${parameters.billToStateProvinceGeo?default(parameters.billToStateProvinceGeoId)}</option>
           </#if>
           <option value="">${uiLabelMap.PartyNoState}</option>
           ${screens.render("component://common/widget/CommonScreens.xml#states")}
@@ -69,7 +69,7 @@
       <span>
         <select name="countryGeoId" id="billToCountryGeoId" class="left required" style="width: 70%">
           <#if parameters.billToCountryGeoId?exists>
-            <option value='${parameters.billToCountryGeoId}'>${selectedCountryName?default(parameters.billToCountryGeoId)}</option>
+            <option value='${parameters.billToCountryGeoId}'>${parameters.billToCountryProvinceGeo?default(parameters.billToCountryGeoId)}</option>
           </#if>
           ${screens.render("component://common/widget/CommonScreens.xml#countries")}
         </select>

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=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl Thu Aug 28 04:12:08 2008
@@ -57,7 +57,8 @@
       <span>
         <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>
+            <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", postalAddress.stateProvinceGeoId), true)>
+            <option value='${postalAddress.stateProvinceGeoId}'>${geo.geoName?default(postalAddress.stateProvinceGeoId)}</option>
           </#if>
           <option value="">${uiLabelMap.PartyNoState}</option>
           ${screens.render("component://common/widget/CommonScreens.xml#states")}
@@ -70,7 +71,8 @@
       <span>
         <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>
+            <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", postalAddress.countryGeoId), true)>
+            <option value='${postalAddress.countryGeoId}'>${geo.geoName?default(postalAddress.countryGeoId)}</option>
           </#if>
           ${screens.render("component://common/widget/CommonScreens.xml#countries")}
         </select>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl Thu Aug 28 04:12:08 2008
@@ -56,7 +56,7 @@
       <span>
         <select name="stateProvinceGeoId" id="shipToStateProvinceGeoId" class="left required" style="width: 70%">
           <#if parameters.shipToStateProvinceGeoId?exists>
-            <option value='${parameters.shipToStateProvinceGeoId}'>${selectedStateName?default(parameters.shipToStateProvinceGeoId)}</option>
+            <option value='${parameters.shipToStateProvinceGeoId}'>${parameters.shipToStateProvinceGeo?default(parameters.shipToStateProvinceGeoId)}</option>
           </#if>
           <option value="">${uiLabelMap.PartyNoState}</option>
           ${screens.render("component://common/widget/CommonScreens.xml#states")}
@@ -69,7 +69,7 @@
       <span>
         <select name="countryGeoId" id="shipToCountryGeoId" class="left required" style="width: 70%">
           <#if parameters.shipToCountryGeoId?exists>
-            <option value='${parameters.shipToCountryGeoId}'>${selectedCountryName?default(parameters.shipToCountryGeoId)}</option>
+            <option value='${parameters.shipToCountryGeoId}'>${parameters.shipToCountryProvinceGeo?default(parameters.shipToCountryGeoId)}</option>
           </#if>
           ${screens.render("component://common/widget/CommonScreens.xml#countries")}
         </select>

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=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl Thu Aug 28 04:12:08 2008
@@ -26,7 +26,7 @@
   <div class="screenlet-body">
     <#-- Add address -->
     <div class="form-row" align="right">
-      <a class="buttontext" id="addAddress" href="javascript:void(0)">${uiLabelMap.CommonAdd} ${uiLabelMap.CommonNew} ${uiLabelMap.CommonAddresses}</a>
+      <a class="buttontext" id="addAddress" href="javascript:void(0)">${uiLabelMap.CommonAdd} ${uiLabelMap.CommonNew} ${uiLabelMap.OrderAddress}</a>
     </div>  
     <div id="displayCreateAddressForm" class="popup" style="display: none;">
       <div id="serverError" class="errorMessage"></div>
@@ -111,9 +111,9 @@
           ${billToTelecomNumber.countryCode?if_exists}-
           ${billToTelecomNumber.areaCode?if_exists}-
           ${billToTelecomNumber.contactNumber?if_exists}
-          <#if billToExtension?has_content>-${billToExtension?if_exists}</#if><br/>
-          <a id="updateBillToPostalAddress" href="javascript:void(0)" class="buttontext popup_link">${uiLabelMap.CommonEdit} ${uiLabelMap.PartyBillingAddress}</a>&nbsp;
+          <#if billToExtension?exists>-${billToExtension?if_exists}</#if><br/>
         </#if>
+        <a id="updateBillToPostalAddress" href="javascript:void(0)" class="buttontext popup_link">${uiLabelMap.CommonEdit} ${uiLabelMap.PartyBillingAddress}</a>&nbsp;
       <#else>
         ${uiLabelMap.PartyBillingAddress} ${uiLabelMap.EcommerceNotExists}
       </#if>
@@ -139,8 +139,8 @@
           ${shipToTelecomNumber.areaCode?if_exists}-
           ${shipToTelecomNumber.contactNumber?if_exists}
           <#if shipToExtension?exists>-${shipToExtension?if_exists}</#if><br/>
-          <a id="updateShipToPostalAddress" href="javascript:void(0)" class="buttontext popup_link">${uiLabelMap.CommonEdit} ${uiLabelMap.OrderShippingAddress}</a>&nbsp;
         </#if>
+        <a id="updateShipToPostalAddress" href="javascript:void(0)" class="buttontext popup_link">${uiLabelMap.CommonEdit} ${uiLabelMap.OrderShippingAddress}</a>&nbsp;
       <#else>
         ${uiLabelMap.OrderShippingAddress} ${uiLabelMap.EcommerceNotExists}
       </#if>

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=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/NewCustomer.ftl Thu Aug 28 04:12:08 2008
@@ -85,13 +85,16 @@
       </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 class="form-field"><input type="text" name="shipToPostalCode" id="shipToPostalCode" class="required" value="${parameters.shipToPostalCode?if_exists}" maxlength="10"/></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="form-field">
           <select name="shipToStateProvinceGeoId" id="shipToStateProvinceGeoId" class='selectBox'>
-            <#if parameters.shipToStateProvinceGeoId?exists><option>${parameters.shipToStateProvinceGeoId?if_exists}</option></#if>
+            <#if parameters.shipToStateProvinceGeoId?exists>
+              <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", parameters.shipToStateProvinceGeoId), true)>
+              <option value='${parameters.shipToStateProvinceGeoId}'>${geo.geoName?default(parameters.shipToStateProvinceGeoId)}</option>
+            </#if>
             ${screens.render("component://common/widget/CommonScreens.xml#states")}
           </select>
         </div>
@@ -100,7 +103,10 @@
         <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="form-field">
           <select name="shipToCountryGeoId" id="shipToCountryGeoId" class='selectBox'>
-            <#if parameters.shipToCountryGeoId?exists><option>${parameters.shipToCountryGeoId?if_exists}</option></#if>
+            <#if parameters.shipToCountryGeoId?exists>
+              <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", parameters.shipToCountryGeoId), true)>
+              <option value='${parameters.shipToCountryGeoId}'>${geo.geoName?default(parameters.shipToCountryGeoId)}</option>
+            </#if>
             ${screens.render("component://common/widget/CommonScreens.xml#countries")}
           </select>
         </div>
@@ -114,10 +120,10 @@
         </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"/>
+          <input type="text" name="shipToCountryCode" id="shipToCountryCode" class="required" value="${parameters.shipToCountryCode?if_exists}" size="3" maxlength="3"/>
+          - <input type="text" name="shipToAreaCode" id="shipToAreaCode" class="required" value="${parameters.shipToAreaCode?if_exists}" size="3" maxlength="3"/>
+          - <input type="text" name="shipToContactNumber" id="shipToContactNumber" class="required" value="${contactNumber?default("${parameters.shipToContactNumber?if_exists}")}" size="6" maxlength="7"/>
+          - <input type="text" name="shipToExtension" id="shipToExtension" value="${extension?default("${parameters.shipToExtension?if_exists}")}" size="3" maxlength="3"/>
         </div>
       </div>
       <div class="form-row">
@@ -142,13 +148,16 @@
         </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 class="form-field"><input type="text" name="billToPostalCode" id="billToPostalCode" class="required" value="${parameters.billToPostalCode?if_exists}" maxlength="10"/></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="form-field">
             <select name="billToStateProvinceGeoId" id="billToStateProvinceGeoId" class="selectBox required">
-              <#if parameters.billToStateProvinceGeoId?exists><option>${parameters.billToStateProvinceGeoId?if_exists}</option></#if>
+              <#if parameters.billToStateProvinceGeoId?exists>
+                <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", parameters.billToStateProvinceGeoId), true)>
+                <option value='${parameters.billToStateProvinceGeoId}'>${geo.geoName?default(parameters.billToStateProvinceGeoId)}</option>
+              </#if>
               ${screens.render("component://common/widget/CommonScreens.xml#states")}
             </select>
           </div>
@@ -157,7 +166,10 @@
           <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="form-field">
             <select name="billToCountryGeoId" id="billToCountryGeoId" class="selectBox required">
-              <#if parameters.billToCountryGeoId?exists><option>${parameters.billToCountryGeoId?if_exists}</option></#if>
+              <#if parameters.billToCountryGeoId?exists>
+                <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", parameters.billToCountryGeoId), true)>
+                <option value='${parameters.billToCountryGeoId}'>${geo.geoName?default(parameters.billToCountryGeoId)}</option>
+              </#if>
               ${screens.render("component://common/widget/CommonScreens.xml#countries")}
             </select>
           </div>
@@ -171,10 +183,10 @@
           </div>
           <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"/>
+            <input type="text" name="billToCountryCode" id="billToCountryCode" class="required" value="${parameters.billToCountryCode?if_exists}" size="3" maxlength="3"/>
+            - <input type="text" name="billToAreaCode" id="billToAreaCode" class="required" value="${parameters.billToAreaCode?if_exists}" size="3" maxlength="3"/>
+            - <input type="text" name="billToContactNumber" id="billToContactNumber" class="required" value="${contactNumber?default("${parameters.billToContactNumber?if_exists}")}" size="6" maxlength="7"/>
+            - <input type="text" name="billToExtension" id="billToExtension" value="${extension?default("${parameters.billToExtension?if_exists}")}" size="3" maxlength="3"/>
           </div>
         </div>
       </div>  

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=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/ViewProfile.ftl Thu Aug 28 04:12:08 2008
@@ -22,7 +22,7 @@
     <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 align="right"><a class="buttontext" href="<@ofbizUrl>editProfile</@ofbizUrl>">${uiLabelMap.EcommerceEditProfile}</a>&nbsp;</div><br/>
     <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.PartyContactInformation}</div></div>
     <div class="screenlet-body">
       <div class="form-row">

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=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js Thu Aug 28 04:12:08 2008
@@ -12,8 +12,10 @@
         validateEditUser = new Validation('editUserForm', {immediate: true, onSubmit: false});
         Event.observe($('submitEditUserForm'), 'click', submitValidEditUser);
     }
-    if ($('emailAddress')) {
-        inPlaceEditEmail('emailAddress');
+    if (!$('newUserForm') && !$('editUserForm')) {
+        if ($('emailAddress')) {
+            inPlaceEditEmail('emailAddress');
+        }
     }
     if ($('addAddress')) {
         validatePostalAddress = new Validation('createPostalAddressForm', {immediate: true, onSubmit: false});

Modified: ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Thu Aug 28 04:12:08 2008
@@ -565,7 +565,7 @@
         <section>
             <actions>
                 <property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
-                <set field="titleProperty" value="PageTitleNewCustomer"/>
+                <set field="titleProperty" value="EcommerceEditProfile"/>
                 <set field="layoutSettings.javaScripts[]" value="/ecommerce/images/profile.js" global="true"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy"/>
@@ -585,9 +585,6 @@
             <actions>
                 <set field="titleProperty" value="EcommerceManageAddresses"/>
                 <set field="partyId" from-field="userLogin.partyId"/>
-                <entity-one entity-name="Party" value-name="party"/>
-                <entity-one entity-name="Person" value-name="person"/>
-                <entity-one entity-name="PartyGroup" value-name="partyGroup"/>
 
                 <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/controls.js" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/ecommerce/images/profile.js" global="true"/>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=689783&r1=689782&r2=689783&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml Thu Aug 28 04:12:08 2008
@@ -413,6 +413,7 @@
                 </call-service>
             </else>
         </if>
+        <!-- Setting the purposes -->
         <if>
             <condition>
                 <or>
@@ -421,21 +422,32 @@
                 </or>
             </condition>
             <then>
-                <set-service-fields service-name="createPartyContactMechPurpose" map-name="parameters" to-map-name="serviceContext"/>
-                <set field="serviceContext.partyId" from-field="userLogin.partyId"/>
                 <if-compare field="parameters.setShippingPurpose" operator="equals" value="Y">
+                    <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpShipList" filter-by-date="true">
+                        <field-map field-name="partyId" env-name="userLogin.partyId"/>
+                        <field-map field-name="contactMechId" env-name="parameters.contactMechId"/>
+                        <field-map field-name="contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
+                    </entity-and>
+                    <!-- If purpose is not exists then create -->
+                    <if-empty field="pcmpShipList">
+                    <set-service-fields service-name="createPartyContactMechPurpose" map-name="parameters" to-map-name="serviceContext"/>
+                    <set field="serviceContext.partyId" from-field="userLogin.partyId"/>
+
                     <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpList" filter-by-date="true">
                         <field-map field-name="partyId" env-name="userLogin.partyId"/>
                         <field-map field-name="contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
                     </entity-and>
                     <if-not-empty field="pcmpList">
-                        <first-from-list entry-name="pcmp" list-name="pcmpList"/>
+                        <first-from-list list-name="pcmpList" entry-name="pcmp"/>
                         <set-service-fields service-name="deletePartyContactMechPurposeIfExists" map-name="pcmp" to-map-name="serviceInMap"/>
                         <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
                         <clear-field field-name="serviceInMap"/>
                     </if-not-empty>
                     <set field="serviceContext.contactMechPurposeTypeId" value="SHIPPING_LOCATION"/>
                     <call-service service-name="createPartyContactMechPurpose" in-map-name="serviceContext"/>
+                    <clear-field field-name="pcmpList"/>
+                    <clear-field field-name="serviceContext"/>
+                    </if-empty>
 
                     <set-service-fields service-name="setPartyProfileDefaults" map-name="parameters" to-map-name="partyProfileDefaultsCtx"/>
                     <set field="partyProfileDefaultsCtx.defaultShipAddr" from-field="parameters.contactMechId"/>
@@ -443,17 +455,28 @@
                     <call-service service-name="setPartyProfileDefaults" in-map-name="partyProfileDefaultsCtx"/>
                 </if-compare>
                 <if-compare field="parameters.setBillingPurpose" operator="equals" value="Y">
+                    <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpBillList" filter-by-date="true">
+                        <field-map field-name="partyId" env-name="userLogin.partyId"/>
+                        <field-map field-name="contactMechId" env-name="parameters.contactMechId"/>
+                        <field-map field-name="contactMechPurposeTypeId" value="BILLING_LOCATION"/>
+                    </entity-and>
+                    <!-- If purpose is not exists then create -->
+                    <if-empty field="pcmpBillList">
+                    <set-service-fields service-name="createPartyContactMechPurpose" map-name="parameters" to-map-name="serviceContext"/>
+                    <set field="serviceContext.partyId" from-field="userLogin.partyId"/>
+
                     <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpList" filter-by-date="true">
                         <field-map field-name="partyId" env-name="userLogin.partyId"/>
                         <field-map field-name="contactMechPurposeTypeId" value="BILLING_LOCATION"/>
                     </entity-and>
                     <if-not-empty field="pcmpList">
-                        <first-from-list entry-name="pcmp" list-name="pcmpList"/>
+                        <first-from-list list-name="pcmpList" entry-name="pcmp"/>
                         <set-service-fields service-name="deletePartyContactMechPurposeIfExists" map-name="pcmp" to-map-name="serviceInMap"/>
                         <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
                     </if-not-empty>
                     <set field="serviceContext.contactMechPurposeTypeId" value="BILLING_LOCATION"/>
                     <call-service service-name="createPartyContactMechPurpose" in-map-name="serviceContext"/>
+                    </if-empty>
 
                     <set-service-fields service-name="setPartyProfileDefaults" map-name="parameters" to-map-name="partyProfileDefaultsCtx"/>
                     <set field="partyProfileDefaultsCtx.defaultBillAddr" from-field="parameters.contactMechId"/>
@@ -508,36 +531,59 @@
                 <set field="parameters.contactMechId" from-field="parameters.newContactMechId"/>
             </else>
             </if-compare-field>
-            <set-service-fields service-name="createPartyContactMechPurpose" map-name="parameters" to-map-name="serviceContext"/>
-            <set field="serviceContext.partyId" from-field="userLogin.partyId"/>
+            <!-- Setting the purposes -->
             <if-compare field="parameters.setShippingPurpose" operator="equals" value="Y">
+                <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpShipList" filter-by-date="true">
+                    <field-map field-name="partyId" env-name="userLogin.partyId"/>
+                    <field-map field-name="contactMechId" env-name="parameters.contactMechId"/>
+                    <field-map field-name="contactMechPurposeTypeId" value="PHONE_SHIPPING"/>
+                </entity-and>
+                <!-- If purpose is not exists then create -->
+                <if-empty field="pcmpShipList">
+                <set-service-fields service-name="createPartyContactMechPurpose" map-name="parameters" to-map-name="serviceContext"/>
+                <set field="serviceContext.partyId" from-field="userLogin.partyId"/>
+
                 <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpList" filter-by-date="true">
                     <field-map field-name="partyId" env-name="userLogin.partyId"/>
                     <field-map field-name="contactMechPurposeTypeId" value="PHONE_SHIPPING"/>
                 </entity-and>
                 <if-not-empty field="pcmpList">
-                    <first-from-list entry-name="pcmp" list-name="pcmpList"/>
+                    <first-from-list list-name="pcmpList" entry-name="pcmp"/>
                     <set-service-fields service-name="deletePartyContactMechPurposeIfExists" map-name="pcmp" to-map-name="serviceInMap"/>
                     <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
                     <clear-field field-name="serviceInMap"/>
                 </if-not-empty>
                 <set field="serviceContext.contactMechPurposeTypeId" value="PHONE_SHIPPING"/>
                 <call-service service-name="createPartyContactMechPurpose" in-map-name="serviceContext"/>
+                <clear-field field-name="pcmpList"/>
+                <clear-field field-name="serviceContext"/>
+                </if-empty>
             </if-compare>
 
             <if-compare field="parameters.setBillingPurpose" operator="equals" value="Y">
+                <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpBillList" filter-by-date="true">
+                    <field-map field-name="partyId" env-name="userLogin.partyId"/>
+                    <field-map field-name="contactMechId" env-name="parameters.contactMechId"/>
+                    <field-map field-name="contactMechPurposeTypeId" value="PHONE_BILLING"/>
+                </entity-and>
+                <!-- If purpose is not exists then create -->
+                <if-empty field="pcmpBillList">
+                <set-service-fields service-name="createPartyContactMechPurpose" map-name="parameters" to-map-name="serviceContext"/>
+                <set field="serviceContext.partyId" from-field="userLogin.partyId"/>
+
                 <entity-and entity-name="PartyContactMechPurpose" list-name="pcmpList" filter-by-date="true">
                     <field-map field-name="partyId" env-name="userLogin.partyId"/>
                     <field-map field-name="contactMechPurposeTypeId" value="PHONE_BILLING"/>
                 </entity-and>
                 <if-not-empty field="pcmpList">
-                    <first-from-list entry-name="pcmp" list-name="pcmpList"/>
+                    <first-from-list list-name="pcmpList" entry-name="pcmp"/>
                     <set-service-fields service-name="deletePartyContactMechPurposeIfExists" map-name="pcmp" to-map-name="serviceInMap"/>
                     <call-service service-name="deletePartyContactMechPurposeIfExists" in-map-name="serviceInMap"/>
                     <clear-field field-name="serviceInMap"/>
                 </if-not-empty>
                 <set field="serviceContext.contactMechPurposeTypeId" value="PHONE_BILLING"/>
                 <call-service service-name="createPartyContactMechPurpose" in-map-name="serviceContext"/>
+                </if-empty>
             </if-compare>
         </if-not-empty>
     </simple-method>