Author: mor
Date: Wed Nov 19 06:01:37 2008 New Revision: 718963 URL: http://svn.apache.org/viewvc?rev=718963&view=rev Log: Fix:Now user see the selected state on Manage Addresses and One Page Checkout pages. Applied patch from Jira Issue OFBIZ-2053 (https://issues.apache.org/jira/browse/OFBIZ-2053) Thanks to Onima Kasliwal and Rishi Solanki. Modified: 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/images/checkoutProcess.js ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl 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=718963&r1=718962&r2=718963&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl Wed Nov 19 06:01:37 2008 @@ -72,7 +72,6 @@ <#else> <option value="_NA_">${uiLabelMap.PartyNoState}</option> </#if> - ${screens.render("component://common/widget/CommonScreens.xml#states")} </select> </span> </div> 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=718963&r1=718962&r2=718963&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl Wed Nov 19 06:01:37 2008 @@ -75,7 +75,6 @@ <#else> <option value="_NA_">${uiLabelMap.PartyNoState}</option> </#if> - ${screens.render("component://common/widget/CommonScreens.xml#states")} </select> <span id="advice-required-stateProvinceGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span> </span> 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=718963&r1=718962&r2=718963&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl Wed Nov 19 06:01:37 2008 @@ -72,7 +72,6 @@ <#else> <option value="_NA_">${uiLabelMap.PartyNoState}</option> </#if> - </select> </span> </div> Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=718963&r1=718962&r2=718963&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js Wed Nov 19 06:01:37 2008 @@ -108,8 +108,16 @@ Event.observe($('shipToCountryGeoId'), 'change', function(){ getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); }); - if($('shipToStateProvinceGeoId').value == "_NA_"){ + if ($('userLoginId')) { + var stateValue = $('shipToStateProvinceGeoId').value; getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); + $('shipToStateProvinceGeoId').value = stateValue; + stateValue = $('billToStateProvinceGeoId').value; + getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); + $('billToStateProvinceGeoId').value = stateValue; + } else { + getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); + getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); } } if ($('billingForm')) { @@ -117,9 +125,6 @@ Event.observe($('billToCountryGeoId'), 'change', function() { getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); }); - if($('billToStateProvinceGeoId').value == "_NA_"){ - getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); - } } }); 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=718963&r1=718962&r2=718963&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js Wed Nov 19 06:01:37 2008 @@ -71,6 +71,10 @@ }); if($('billToStateProvinceGeoId').value == "_NA_"){ getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); + } else { + stateValue = $('billToStateProvinceGeoId').value; + getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); + $('billToStateProvinceGeoId').value = stateValue; } } if ($('editShipToPostalAddress')) { @@ -80,6 +84,10 @@ }); if($('shipToStateProvinceGeoId').value == "_NA_"){ getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); + } else { + var stateValue = $('shipToStateProvinceGeoId').value; + getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); + $('shipToStateProvinceGeoId').value = stateValue; } } }); @@ -391,8 +399,12 @@ Event.observe($('countryGeoId_'+id), 'change', function() { getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id); }); - if($('stateProvinceGeoId_'+id).value == "_NA_"){ + if ($('stateProvinceGeoId_'+id).value == "_NA_") { getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id); + } else { + var stateValue = $('stateProvinceGeoId_'+id).value; + getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id); + $('stateProvinceGeoId_'+id).value = stateValue; } } } Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=718963&r1=718962&r2=718963&view=diff ============================================================================== --- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original) +++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Wed Nov 19 06:01:37 2008 @@ -255,6 +255,7 @@ <#if userLogin?exists> <input type="hidden" name="keepAddressBook" value="Y"/> <input type="hidden" name="setDefaultShipping" value="Y"/> + <input type="hidden" name="userLoginId" id="userLoginId" value="${userLogin.userLoginId!}"/> <#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request)/> <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/> <#else> @@ -642,7 +643,6 @@ <#else> <option value="_NA_">${uiLabelMap.PartyNoState}</option> </#if> - ${screens.render("component://common/widget/CommonScreens.xml#states")} </select> </div> </div> |
Free forum by Nabble | Edit this page |