svn commit: r639121 - in /ofbiz/trunk/applications/ecommerce: webapp/ecommerce/images/quickAnonCustSettings.js webapp/ecommerce/order/quickAnonCustSettings.ftl widget/CommonScreens.xml

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

svn commit: r639121 - in /ofbiz/trunk/applications/ecommerce: webapp/ecommerce/images/quickAnonCustSettings.js webapp/ecommerce/order/quickAnonCustSettings.ftl widget/CommonScreens.xml

apatel-2
Author: apatel
Date: Wed Mar 19 19:46:10 2008
New Revision: 639121

URL: http://svn.apache.org/viewvc?rev=639121&view=rev
Log:
Added form field validation using validation.js library.

Added:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js   (with props)
Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl
    ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml

Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js?rev=639121&view=auto
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js (added)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js Wed Mar 19 19:46:10 2008
@@ -0,0 +1,6 @@
+Event.observe(window, 'load', isValidElement);
+
+function isValidElement(element){
+    var validator = new Validation('quickAnonProcessCustomer',  {immediate : true});
+ }
+  

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl?rev=639121&r1=639120&r2=639121&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/quickAnonCustSettings.ftl Wed Mar 19 19:46:10 2008
@@ -76,7 +76,7 @@
      <div class="boxhead">&nbsp;${uiLabelMap.PartyBasicInformation}</div>
   </div>
   <div class="screenlet-body">
-  <form name="${parameters.formNameValue}" method="post" action="<@ofbizUrl>quickAnonProcessCustomerSettings</@ofbizUrl>">
+  <form name="${parameters.formNameValue}" id="quickAnonProcessCustomer" method="post" action="<@ofbizUrl>quickAnonProcessCustomerSettings</@ofbizUrl>">
   <input type="hidden" name="partyId" value="${parameters.partyId?if_exists}"/>
   <input type="hidden" name="shippingContactMechId" value="${parameters.shippingContactMechId?if_exists}"/>
   <input type="hidden" name="billingContactMechId" value="${parameters.billingContactMechId?if_exists}"/>
@@ -102,14 +102,14 @@
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
                   <@fieldErrors fieldName="firstName"/>
-                  <input type="text" class="inputBox" name="firstName" value="${parameters.firstName?if_exists}" size="30" maxlength="30"/>
+                  <input type="text" class="inputBox required" name="firstName" id="firstName" value="${parameters.firstName?if_exists}" size="30" maxlength="30"/>
                 *</td>
               </tr>
               <tr>
                 <td width="26%" align="right"><div class="tabletext">${uiLabelMap.PartyMiddleInitial}</div></td>
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
-                  <input type="text" class="inputBox" name="middleName" value="${parameters.middleName?if_exists}" size="4" maxlength="4"/>
+                  <input type="text" class="inputBox"  name="middleName" value="${parameters.middleName?if_exists}" size="4" maxlength="4"/>
                 </td>
               </tr>
               <tr>
@@ -117,7 +117,7 @@
                 <td width="2%">&nbsp;</td>
                 <td width="72%">
                   <@fieldErrors fieldName="lastName"/>
-                  <input type="text" class="inputBox" name="lastName" value="${parameters.lastName?if_exists}" size="30" maxlength="30"/>
+                  <input type="text" class="inputBox required" name="lastName" value="${parameters.lastName?if_exists}" size="30" maxlength="30"/>
                 *</td>
               </tr>
               <tr>
@@ -126,15 +126,17 @@
                 <td width="72%"><div class="tabletext">[${uiLabelMap.PartyCountryCode}] [${uiLabelMap.PartyAreaCode}] [${uiLabelMap.PartyContactNumber}] [${uiLabelMap.PartyExtension}]</div></td>
               </tr>
               <tr>
-                <td width="26%" align="right"><div class="tabletext">${uiLabelMap.PartyHomePhone}</div></td>
+                <td width="10%" align="right"><div class="tabletext">${uiLabelMap.PartyHomePhone}</div></td>
                 <td width="2%">&nbsp;</td>
-                <td width="72%">
+                <td width="88%">
                   <@fieldErrorsMulti fieldName1="homeCountryCode" fieldName2="homeAreaCode" fieldName3="homeContactNumber" fieldName4="homeExt"/>
-                  <input type="hidden" name="homePhoneContactMechId" value="${parameters.homePhoneContactMechId?if_exists}"/>
-                  <input type="text" class="inputBox" name="homeCountryCode" value="${parameters.homeCountryCode?if_exists}" size="4" maxlength="10"/>
-                  -&nbsp;<input type="text" class="inputBox" name="homeAreaCode" value="${parameters.homeAreaCode?if_exists}" size="4" maxlength="10"/>
-                  -&nbsp;<input type="text" class="inputBox" name="homeContactNumber" value="${parameters.homeContactNumber?if_exists}" size="15" maxlength="15"/>
-                  -&nbsp;<input type="text" class='inputBox' name="homeExt" value="${parameters.homeExt?if_exists}" size="6" maxlength="10"/> *
+                  <div>
+                    <input type="hidden" name="homePhoneContactMechId" value="${parameters.homePhoneContactMechId?if_exists}"/>
+                    <input type="text" class="inputBox required" name="homeCountryCode" value="${parameters.homeCountryCode?if_exists}" size="4" maxlength="10"/>
+                    -&nbsp;<input type="text" class="inputBox required" name="homeAreaCode" value="${parameters.homeAreaCode?if_exists}" size="4" maxlength="10"/>
+                    -&nbsp;<input type="text" class="inputBox required" name="homeContactNumber" value="${parameters.homeContactNumber?if_exists}" size="15" maxlength="15"/>
+                    -&nbsp;<input type="text" class="inputBox required" name="homeExt" value="${parameters.homeExt?if_exists}" size="6" maxlength="10"/> *
+                  </div>
                 </td>
               </tr>
               <tr>
@@ -154,7 +156,7 @@
                 <td width="72%">
                   <@fieldErrors fieldName="emailAddress"/>
                   <input type="hidden" name="emailContactMechId" value="${parameters.emailContactMechId?if_exists}"/>
-                  <input type="text" class="inputBox" name="emailAddress" value="${parameters.emailAddress?if_exists}" size="40" maxlength="255"/> *
+                  <input type="text" class="inputBox required validate-email" name="emailAddress" value="${parameters.emailAddress?if_exists}" size="40" maxlength="255"/> *
                 </td>
               </tr>
             </table>
@@ -197,7 +199,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="shipToAddress1"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="shipToAddress1" value="${parameters.shipToAddress1?if_exists}">
+                    <input type="text" class="inputBox required" size="30" maxlength="30" name="shipToAddress1" value="${parameters.shipToAddress1?if_exists}">
                  *</td>
               </tr>
               <tr>
@@ -212,7 +214,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="shipToCity"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="shipToCity" value="${parameters.shipToCity?if_exists}">
+                    <input type="text" class="inputBox required" size="30" maxlength="30" name="shipToCity" value="${parameters.shipToCity?if_exists}">
                  *</td>
               </tr>
               <tr>
@@ -220,7 +222,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="shipToStateProvinceGeoId"/>
-                    <select name="shipToStateProvinceGeoId" class="selectBox">
+                    <select name="shipToStateProvinceGeoId" class="selectBox required">
                     <#if (parameters.shipToStateProvinceGeoId)?exists>
                        <option>${parameters.shipToStateProvinceGeoId}</option>
                        <option value="${parameters.shipToStateProvinceGeoId}">---</option>
@@ -236,7 +238,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="shipToPostalCode"/>
-                    <input type="text" class="inputBox" size="12" maxlength="10" name="shipToPostalCode" value="${parameters.shipToPostalCode?if_exists}">
+                    <input type="text" class="inputBox required" size="12" maxlength="10" name="shipToPostalCode" value="${parameters.shipToPostalCode?if_exists}">
                  *</td>
               </tr>
               <tr>
@@ -292,7 +294,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="billToAddress1"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="billToAddress1" value="${parameters.billToAddress1?if_exists}">
+                    <input type="text" class="inputBox required" size="30" maxlength="30" name="billToAddress1" value="${parameters.billToAddress1?if_exists}">
                  *</td>
               </tr>
               <tr>
@@ -307,7 +309,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="billToCity"/>
-                    <input type="text" class="inputBox" size="30" maxlength="30" name="billToCity" value="${parameters.billToCity?if_exists}">
+                    <input type="text" class="inputBox required" size="30" maxlength="30" name="billToCity" value="${parameters.billToCity?if_exists}">
                  *</td>
               </tr>
               <tr>
@@ -315,7 +317,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="billToStateProvinceGeoId"/>
-                    <select name="billToStateProvinceGeoId" class="selectBox">
+                    <select name="billToStateProvinceGeoId" class="selectBox required">
                     <#if (parameters.billToStateProvinceGeoId)?exists>
                        <option>${parameters.billToStateProvinceGeoId}</option>
                        <option value="${parameters.billToStateProvinceGeoId}">---</option>
@@ -331,7 +333,7 @@
                  <td width="2%">&nbsp;</td>
                  <td width="72%">
                     <@fieldErrors fieldName="billToPostalCode"/>
-                    <input type="text" class="inputBox" size="12" maxlength="10" name="billToPostalCode" value="${parameters.billToPostalCode?if_exists}">
+                    <input type="text" class="inputBox required" size="12" maxlength="10" name="billToPostalCode" value="${parameters.billToPostalCode?if_exists}">
                  *</td>
               </tr>
               <tr>

Modified: ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml?rev=639121&r1=639120&r2=639121&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml Wed Mar 19 19:46:10 2008
@@ -39,10 +39,13 @@
 
                 <!-- The default (main) java scripts -->
                 <!-- NOTE: this should be included on each screen that uses it to avoid including it in all screens: -->
+                <set field="layoutSettings.javaScripts[+0]" value="/ecommerce/images/quickAnonCustSettings.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/fieldlookup.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/selectall.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/calendar1.js" global="true"/>
-            
+                <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/validation.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/prototype.js" global="true"/>
+            
                 <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot; href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;" global="true"/>
                 <script location="component://ecommerce/widget/EcommerceSetup.bsh"/>