You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/11/15 12:59:51 UTC
svn commit: r1639861 - in
/ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce:
customer/profile/ManageAddress.ftl images/profile.js
Author: ashish
Date: Sat Nov 15 11:59:51 2014
New Revision: 1639861
URL: http://svn.apache.org/r1639861
Log:
Applied bug fix from trunk r1639859.
Applied patch from jira issue OFBIZ-4569 - Update address dialog shows multiple CommonUpdatingData when required field is missing.
============================================================================================
Open update address dialog (profile->Manage Addresses->Edit)
Remove one of the required field.
Hit submit couple of times. You need notice, it shows 'CommonUpdatingData' at the top.
It should validate the form before adding the label.
============================================================================================
Thanks Kiran for reporting the issue, Thanks Deepak for providing the patch for this issue.
Modified:
ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl
ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js
Modified: ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl?rev=1639861&r1=1639860&r2=1639861&view=diff
==============================================================================
--- ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl (original)
+++ ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl Sat Nov 15 11:59:51 2014
@@ -94,8 +94,10 @@ under the License.
buttons: {
'${uiLabelMap.CommonSubmit}': function() {
var createAddressForm = jQuery("#displayCreateAddressForm");
- jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
- createPartyPostalAddress();
+ if (jQuery("#createPostalAddressForm").valid()) {
+ jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
+ createPartyPostalAddress();
+ }
},
'${uiLabelMap.CommonClose}': function() {
jQuery(this).dialog('close');
@@ -147,8 +149,11 @@ under the License.
buttons: {
'${uiLabelMap.CommonSubmit}': function() {
var createAddressForm = jQuery("#displayEditBillToPostalAddress");
- jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
- updatePartyBillToPostalAddress();
+ if (jQuery("#editBillToPostalAddress").valid()) {
+ jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
+ updatePartyBillToPostalAddress();
+ }
+
},
'${uiLabelMap.CommonClose}': function() {
jQuery(this).dialog('close');
@@ -195,8 +200,10 @@ under the License.
buttons: {
'${uiLabelMap.CommonSubmit}': function() {
var createAddressForm = jQuery("#displayEditShipToPostalAddress");
- jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
- updatePartyShipToPostalAddress('submitEditShipToPostalAddress');
+ if (jQuery("#editShipToPostalAddress").valid()) {
+ jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
+ updatePartyShipToPostalAddress('submitEditShipToPostalAddress');
+ }
},
'${uiLabelMap.CommonClose}': function() {
jQuery(this).dialog('close');
@@ -263,8 +270,10 @@ under the License.
buttons: {
'${uiLabelMap.CommonSubmit}': function() {
var createAddressForm = jQuery("#displayEditAddressForm_${contactMech.contactMechId}");
- jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
- updatePartyPostalAddress('submitEditPostalAddress_${contactMech.contactMechId}');
+ if (jQuery("#editPostalAddress_${contactMech.contactMechId}").valid()) {
+ jQuery("<p>${uiLabelMap.CommonUpdatingData}</p>").insertBefore(createAddressForm);
+ updatePartyPostalAddress('submitEditPostalAddress_${contactMech.contactMechId}');
+ }
},
'${uiLabelMap.CommonClose}': function() {
jQuery(this).dialog('close');
Modified: ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js?rev=1639861&r1=1639860&r2=1639861&view=diff
==============================================================================
--- ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js (original)
+++ ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js Sat Nov 15 11:59:51 2014
@@ -260,7 +260,6 @@ function updatePartyShipToPostalAddress(
function updatePartyBillToPostalAddress(e) {
formId = 'editBillToPostalAddress';
- var validateEditPostalAddress = new Validation(formId, {immediate: true, onSubmit: false});
errorId = 'billToServerError';
popupId = 'displayEditBillToPostalAddress';
requestUrl = 'updatePartyPostalAddress';