From a6151e725f92dc0bbb5ec91bb9883dbbd86cfde8 Mon Sep 17 00:00:00 2001 From: Anil Patel Date: Thu, 20 Mar 2008 02:46:10 +0000 Subject: [PATCH] Added form field validation using validation.js library. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@639121 13f79535-47bb-0310-9956-ffa450edef68 --- .../ecommerce/images/quickAnonCustSettings.js | 6 +++ .../ecommerce/order/quickAnonCustSettings.ftl | 42 ++++++++++--------- .../ecommerce/widget/CommonScreens.xml | 5 ++- 3 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js diff --git a/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js b/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js new file mode 100644 index 0000000000..ff188f8e03 --- /dev/null +++ b/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js @@ -0,0 +1,6 @@ +Event.observe(window, 'load', isValidElement); + +function isValidElement(element){ + var validator = new Validation('quickAnonProcessCustomer', {immediate : true}); + } + diff --git a/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl b/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl index 1aa356b8e2..e121697bf5 100644 --- a/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl +++ b/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl @@ -76,7 +76,7 @@ function shipBillAddr() {
 ${uiLabelMap.PartyBasicInformation}
-
+ @@ -102,14 +102,14 @@ function shipBillAddr() {   <@fieldErrors fieldName="firstName"/> - + *
${uiLabelMap.PartyMiddleInitial}
  - + @@ -117,7 +117,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="lastName"/> - + * @@ -126,15 +126,17 @@ function shipBillAddr() {
[${uiLabelMap.PartyCountryCode}] [${uiLabelMap.PartyAreaCode}] [${uiLabelMap.PartyContactNumber}] [${uiLabelMap.PartyExtension}]
-
${uiLabelMap.PartyHomePhone}
+
${uiLabelMap.PartyHomePhone}
  - + <@fieldErrorsMulti fieldName1="homeCountryCode" fieldName2="homeAreaCode" fieldName3="homeContactNumber" fieldName4="homeExt"/> - - - -  - -  - -  * +
+ + + -  + -  + -  * +
@@ -154,7 +156,7 @@ function shipBillAddr() { <@fieldErrors fieldName="emailAddress"/> - * + * @@ -197,7 +199,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="shipToAddress1"/> - + * @@ -212,7 +214,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="shipToCity"/> - + * @@ -220,7 +222,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="shipToStateProvinceGeoId"/> - <#if (parameters.shipToStateProvinceGeoId)?exists> @@ -236,7 +238,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="shipToPostalCode"/> - + * @@ -292,7 +294,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="billToAddress1"/> - + * @@ -307,7 +309,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="billToCity"/> - + * @@ -315,7 +317,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="billToStateProvinceGeoId"/> - <#if (parameters.billToStateProvinceGeoId)?exists> @@ -331,7 +333,7 @@ function shipBillAddr() {   <@fieldErrors fieldName="billToPostalCode"/> - + * diff --git a/applications/ecommerce/widget/CommonScreens.xml b/applications/ecommerce/widget/CommonScreens.xml index c54e2652af..454bb1d2ef 100644 --- a/applications/ecommerce/widget/CommonScreens.xml +++ b/applications/ecommerce/widget/CommonScreens.xml @@ -39,10 +39,13 @@ under the License. + - + + +