You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2012/10/25 07:04:29 UTC

svn commit: r1401975 [7/29] - in /ofbiz/branches/20120329_portletWidget: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting/t...

Modified: ofbiz/branches/20120329_portletWidget/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/common/widget/CommonScreens.xml?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/common/widget/CommonScreens.xml Thu Oct 25 05:04:09 2012
@@ -143,15 +143,14 @@ under the License.
                 <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.dateTime.getFilePath(initialLocaleComplete)}" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" global="true" />
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.0.0.js" global="true" />
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.0.5.js" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jquery.maskedinput-1.2.2.min.js" global="true" />
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.16.custom.min.js" global="true" />
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.9.0.custom.min.js" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jeditable/jquery.jeditable.js" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/fjTimer/jquerytimer-min.js" global="true" />
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true" />
-                <set field="layoutSettings.javaScripts[+0]" value="/images/portlet.js" global="true"/><!--#Eam# portletWidget -->
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.7.2.min.js" global="true" />
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.8.2.min.js" global="true" />
                 <!-- jQuery CSSs -->
                 <set field="layoutSettings.styleSheets[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" global="true" />
                 <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true" />
@@ -185,10 +184,6 @@ under the License.
                         <set field="appbarOpenTemplateLocation" from-field="layoutSettings.VT_NAV_OPEN_TMPLT[0]" />
                         <set field="appbarCloseTemplateLocation" from-field="layoutSettings.VT_NAV_CLOSE_TMPLT[0]" />
                         <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC[0]" />
-                        <!--#Bam# icons-purpose-->
-                        <set field="iconsPurposeProp" from-field="layoutSettings.VT_ICONS_PURP[0]" default-value="iconsPurpose"/>
-                        <property-map resource="${iconsPurposeProp}" map-name="iconsPurpose" global="true" />
-                        <!--#Eam# icons-purpose-->
                         <set field="layoutSettings.suppressTab" value="ofbizsetup"/><!-- diseable ofbiz setup by default -->
                     </actions>
                     <widgets />
@@ -392,10 +387,6 @@ under the License.
                         <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/>
 
                         <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC[0]" default-value="component://common/webcommon/includes/messages.ftl"/>
-                        <!--#Bam# icons-purpose-->
-                        <set field="iconsPurposeProp" from-field="layoutSettings.VT_ICONS_PURP[0]" default-value="iconsPurpose"/>
-                        <property-map resource="${iconsPurposeProp}" map-name="iconsPurpose" global="true" />
-                        <!--#Eam# icons-purpose-->
                     </actions>
                     <widgets>
                         <section>
@@ -480,14 +471,13 @@ under the License.
                 <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true"/>
 
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.0.0.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.16.custom.min.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.0.5.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.9.0.custom.min.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jeditable/jquery.jeditable.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/fjTimer/jquerytimer-min.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/>
                 <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/portlet.js" global="true"/><!--#Eam# portletWidget -->
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.7.2.min.js" global="true"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.8.2.min.js" global="true"/>
                     <!-- jQuery CSSs -->
                 <set field="layoutSettings.styleSheets[+0]" value="/images/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" global="true"/>
 
@@ -501,10 +491,6 @@ under the License.
                 <!-- The settings below are used for xsl-fo screens -->
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                 <set field="logoImageUrl" value="/images/ofbiz_logo.gif"/>
-                <!--#Bam# icons-purpose-->
-                <set field="iconsPurposeProp" from-field="layoutSettings.VT_ICONS_PURP[0]" default-value="iconsPurpose"/>
-                <property-map resource="${iconsPurposeProp}" map-name="iconsPurpose" global="true" />
-                <!--#Eam# icons-purpose-->
                 <!--<set field="defaultFontFamily" value="Arial"/>-->
             </actions>
             <widgets>
@@ -711,71 +697,4 @@ under the License.
             </widgets>
         </section>
     </screen>
-
-    <!--#Bam# portletUiLabelDecorator : manage standard portlet decorator -->
-    <screen name="uiLabelDecorator">
-        <section>
-            <actions>
-                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true" />
-                <property-map resource="general" map-name="generalProperties" global="true"/>
-                <set field="defaultVisualThemeId" from-field="generalProperties.defaultVisualThemeId" default-value="SMOOTH_FEATHER"/>
-                <set field="visualThemeId" from-field="userPreferences.VISUAL_THEME" default-value="${defaultVisualThemeId}" global="true"/>
-                <service service-name="getVisualThemeResources">
-                    <field-map field-name="visualThemeId"/>
-                    <field-map field-name="themeResources" from-field="layoutSettings"/>
-                </service>
-                <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
-                <set field="iconsLocation" from-field="layoutSettings.VT_ICONS_LOC[0]" default-value="/images/icons/famfamfam" global="true"/>
-                <set field="iconsPurposeProp" from-field="layoutSettings.VT_ICONS_PURP[0]" default-value="iconsPurpose"/>
-                <property-map resource="${iconsPurposeProp}" map-name="iconsPurpose" global="true" />
-            </actions>
-            <widgets>
-              <section>
-                <condition>
-                  <if-empty field="includedInPage"/>
-                </condition>
-                <widgets>
-                  <platform-specific>
-                    <html>
-                        <html-template location="component://common/webcommon/includes/messages.ftl" />
-                    </html>
-                  </platform-specific>
-                </widgets>
-              </section>
-            </widgets>
-        </section>
-    </screen>
-
-    <screen name="portletUiLabelDecorator">
-      <section>
-        <widgets>
-          <decorator-screen name="uiLabelDecorator" location="${parameters.mainDecoratorLocation}">
-              <decorator-section name="body">
-                <decorator-section-include name="body" />
-              </decorator-section>
-          </decorator-screen>
-        </widgets>
-      </section>
-    </screen>
-    <!--  can be use for all portalPage build like exampleMgmt  -->
-    <screen name="ShowCommonDetailPortlet">
-        <section>
-            <actions>
-                <set field="defaultdetailPortletId" from-field="detailCommonPortletId" from-scope="user" default-value="CommonInfo"/>
-                <set field="portalPortletId" from-field="parameters.portalPortletId" default-value="${defaultdetailPortletId}"/>
-                <set field="detailCommonPortletId" from-field="portalPortletId" to-scope="user"/>
-                <set field="portalPageId" from-field="parameters.portalPageId"/>
-                <set field="parameters.areaId" value="PP_${portalPageId}CommonDetail00001"/>
-                <set field="portletSeqId" from-field="parameters.portletSeqId" default-value="00001"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="portletUiLabelDecorator">
-                    <decorator-section name="body">
-                      <include-portal-page id="${portalPageId}" portalPortletId="${portalPortletId}" portletSeqId="${portletSeqId}"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <!--#Eam# portletUiLabelDecorator -->
 </screens>

Modified: ofbiz/branches/20120329_portletWidget/framework/entity/config/entityengine.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entity/config/entityengine.xml?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entity/config/entityengine.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entity/config/entityengine.xml Thu Oct 25 05:04:09 2012
@@ -158,6 +158,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.hsqldb.jdbcDriver"
                 jdbc-uri="jdbc:hsqldb:data/hsqldb/ofbiz"
@@ -187,6 +189,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
         <inline-jdbc
                 jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
@@ -237,6 +241,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
                 jdbc-uri="jdbc:derby:ofbizolap;create=true"
@@ -263,6 +269,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
         <inline-jdbc
             jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
@@ -286,6 +294,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <!-- this setup is for the embedded version of Daffodil, with in.co.daffodil.db.jdbc.DaffodilDBDriver -->
         <!-- note that Daffodil can also run in a network mode with the driver class: in.co.daffodil.db.rmi.RmiDaffodilDBDriver and URI: jdbc:daffodilDB://<hostname>:<port>/ofbiz;create=true -->
         <inline-jdbc
@@ -311,6 +321,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.axiondb.jdbc.AxionDriver"
                 jdbc-uri="jdbc:axiondb:ofbiz:data/axion/ofbiz"
@@ -340,6 +352,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.mysql.jdbc.Driver"
                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
@@ -371,6 +385,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.mysql.jdbc.Driver"
                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=true"
@@ -402,6 +418,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.mysql.jdbc.Driver"
                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbiztenant?autoReconnect=true"
@@ -461,6 +479,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.postgresql.Driver"
                 jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz"
@@ -499,6 +519,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
             jdbc-driver="org.postgresql.Driver"
             jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz"
@@ -533,6 +555,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.postgresql.Driver"
                 jdbc-uri="jdbc:postgresql://127.0.0.1/ofbizolap"
@@ -567,6 +591,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.postgresql.Driver"
                 jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiztenant"
@@ -599,6 +625,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="oracle.jdbc.driver.OracleDriver"
                 jdbc-uri="jdbc:oracle:thin:@127.0.0.1:1521:ofbiz"
@@ -640,6 +668,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.sybase.jdbc2.jdbc.SybDriver"
                 jdbc-uri="jdbc:sybase:Tds:10.1.1.10:11222/ofbiz?DYNAMIC_PREPARE=true"
@@ -664,6 +694,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.sap.dbtech.jdbc.DriverSapDB"
                 jdbc-uri="jdbc:sapdb://localhost/OFBIZ"
@@ -692,6 +724,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="org.firebirdsql.jdbc.FBDriver"
                 jdbc-uri="jdbc:firebirdsql:127.0.0.1:C:\\data\\ofbiz.gdb"
@@ -735,6 +769,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                 jdbc-uri="jdbc:sqlserver://localhost:1791;databaseName=ofbiz;SelectMethod=cursor;"
@@ -759,6 +795,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.p6spy.engine.spy.P6SpyDriver"
                 jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz"
@@ -787,6 +825,8 @@ access. For a detailed description see t
         <read-data reader-name="seed-initial"/>
         <read-data reader-name="demo"/>
         <read-data reader-name="ext"/>
+        <read-data reader-name="ext-test"/>
+        <read-data reader-name="ext-demo"/>
         <inline-jdbc
                 jdbc-driver="com.extendedsystems.jdbc.advantage.ADSDriver"
                 jdbc-uri="jdbc:extendedsystems:advantage://localhost:6262;catalog=c:\\advantage\\OFBIZ.ADD;TableType=adt"

Modified: ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/GenericEntity.java Thu Oct 25 05:04:09 2012
@@ -619,14 +619,8 @@ public class GenericEntity extends Obser
     }
 
     public String getString(String name) {
-        // might be nice to add some ClassCastException handling... and auto conversion? hmmm...
         Object object = get(name);
-        if (object == null) return null;
-        if (object instanceof java.lang.String) {
-            return (String) object;
-        } else {
-            return object.toString();
-        }
+        return object == null ? null : object.toString();
     }
 
     public java.sql.Timestamp getTimestamp(String name) {
@@ -657,10 +651,9 @@ public class GenericEntity extends Obser
         // this "hack" is needed for now until the Double/BigDecimal issues are all resolved
         Object value = get(name);
         if (value instanceof BigDecimal) {
-            return Double.valueOf(((BigDecimal) value).doubleValue());
-        } else {
-            return (Double) value;
+            return new Double(((BigDecimal) value).doubleValue());
         }
+        return (Double) value;
     }
 
     public BigDecimal getBigDecimal(String name) {
@@ -668,10 +661,9 @@ public class GenericEntity extends Obser
         // NOTE: for things to generally work properly BigDecimal should really be used as the java-type in the field type def XML files
         Object value = get(name);
         if (value instanceof Double) {
-            return BigDecimal.valueOf(((Double) value).doubleValue());
-        } else {
-            return (BigDecimal) value;
+            return new BigDecimal(((Double) value).doubleValue());
         }
+        return (BigDecimal) value;
     }
 
     @SuppressWarnings("deprecation")

Modified: ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java Thu Oct 25 05:04:09 2012
@@ -230,7 +230,7 @@ public class DynamicViewEntity {
     }
 
     /**
-     * @deprecated use {@link #addAliasAll(String, String, Collection<String>)}
+     * @deprecated use {@link #addAliasAll(String, String, Collection)}
      */
     @Deprecated
     public void addAliasAll(String entityAlias, String prefix) {

Modified: ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Thu Oct 25 05:04:09 2012
@@ -346,6 +346,9 @@ public class ModelEntity extends ModelIn
                     if (UtilValidate.isNotEmpty(field.getDescription())) {
                         existingField.setDescription(field.getDescription());
                     }
+                    if (UtilValidate.isNotEmpty(field.getEnableAuditLog())) {
+                        existingField.setEnableAuditLog(field.getEnableAuditLog());
+                    }
                 } else {
                     // add to the entity as a new field
                     field.setModelEntity(this);

Modified: ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelField.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelField.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelField.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/model/ModelField.java Thu Oct 25 05:04:09 2012
@@ -179,6 +179,10 @@ public class ModelField extends ModelChi
     public boolean getEnableAuditLog() {
         return this.enableAuditLog;
     }
+    
+    public void setEnableAuditLog(boolean enableAuditLog) {
+        this.enableAuditLog = enableAuditLog;
+    }
 
     public boolean getIsAutoCreatedInternal() {
         return this.isAutoCreatedInternal;

Modified: ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Thu Oct 25 05:04:09 2012
@@ -46,12 +46,12 @@ import java.util.WeakHashMap;
 import javax.xml.bind.DatatypeConverter;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilXml;
-import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilObject;
-import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericPK;
 import org.ofbiz.entity.GenericValue;

Modified: ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Thu Oct 25 05:04:09 2012
@@ -83,9 +83,7 @@ public class EntityDataLoadContainer imp
         super();
     }
 
-    /**
-     * @see org.ofbiz.base.container.Container#init(String[] args, String name, String configFile)
-     */
+    @Override
     public void init(String[] args, String name, String configFile) throws ContainerException {
         this.name = name;
         this.configFile = configFile;

Modified: ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java Thu Oct 25 05:04:09 2012
@@ -801,9 +801,9 @@ public class EntityPermissionChecker {
      */
     public static List<String> getUserRoles(GenericValue entity, GenericValue userLogin, Delegator delegator) throws GenericEntityException {
 
-        String entityName = entity.getEntityName();
         List<String> roles = FastList.newInstance();
         if (entity == null) return roles;
+        String entityName = entity.getEntityName();
             // TODO: Need to use ContentManagementWorker.getAuthorContent first
 
 

Modified: ofbiz/branches/20120329_portletWidget/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java Thu Oct 25 05:04:09 2012
@@ -37,9 +37,7 @@ public class GeronimoContainer implement
     protected String configFile = null;
     private String name;
 
-    /**
-     * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String)
-     */
+    @Override
     public void init(String[] args, String name, String configFile) throws ContainerException {
         this.name = name;
         this.configFile = configFile;

Modified: ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/fieldlookup.js?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/fieldlookup.js Thu Oct 25 05:04:09 2012
@@ -650,6 +650,7 @@ function lookupFormAjaxRequest(formActio
 	var screenletTitleBar = jQuery("#" + lookupId + " .screenlet-title-bar :visible:first");
 	jQuery.ajax({
 		url : formAction,
+		type: "POST",
 		data : data,
 		beforeSend : function(jqXHR, settings) {
 			// Here we append the spinner to the lookup screenlet and it will
@@ -718,7 +719,7 @@ function lookupPaginationAjaxRequest(nav
  ******************************************************************************/
 var re_id = new RegExp('id=(\\d+)');
 var num_id = (re_id.exec(String(window.location)) ? new Number(RegExp.$1) : 0);
-var obj_caller = (window.opener ? window.opener.lookups[num_id] : null);
+var obj_caller = (window.opener && window.opener.lookups? window.opener.lookups[num_id]: null);
 if (obj_caller == null && window.opener != null) {
 	obj_caller = window.opener;
 } else if (obj_caller == null && window.opener == null) {
@@ -851,22 +852,21 @@ lookupDescriptionLoaded.prototype.update
 		this.allParams = this.params + '&' + fieldSerialized + '&' + 'searchType=EQUALS';
 		var _fieldId = this.fieldId;
 
-		jQuery
-				.ajax({
-					url : this.url,
-					type : "POST",
-					data : this.allParams,
-					async : false,
-					success : function(result) {
-						// This would be far more reliable if we were removing
-						// the widget boundaries in LookupDecorator using
-						// widgetVerbose in context :/
-						if (result.split("ajaxAutocompleteOptions.ftl -->")[1]) {
-							setLookDescription(_fieldId, result.split("ajaxAutocompleteOptions.ftl -->")[1].trim().split("<!--")[0].trim(),
-									"", "");
-						}
-					}
-				});
+		jQuery.ajax({
+			url : this.url,
+			type : "POST",
+			data : this.allParams,
+			async : false,
+			success : function(result) {
+				// This would be far more reliable if we were removing
+				// the widget boundaries in LookupDecorator using
+				// widgetVerbose in context :/
+				if (result.split("ajaxAutocompleteOptions.ftl -->")[1]) {
+					setLookDescription(_fieldId, result.split("ajaxAutocompleteOptions.ftl -->")[1].trim().split("<!--")[0].trim(),
+							"", "");
+				}
+			}
+		});
 	}
 }
 

Modified: ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/elrte.html
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/elrte.html?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/elrte.html (original)
+++ ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/elrte.html Thu Oct 25 05:04:09 2012
@@ -5,9 +5,7 @@
 	<title>elRTE</title>
 
 	<!-- jQuery and jQuery UI -->
-	<script src="js/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
-	<script src="js/jquery-ui-1.8.13.custom.min.js" type="text/javascript" charset="utf-8"></script>
-	<link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css" media="screen" charset="utf-8">
+	<link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.22.custom.css" type="text/css" media="screen" charset="utf-8">
 
 	<!-- elRTE -->
 	<script src="js/elrte.min.js" type="text/javascript" charset="utf-8"></script>
@@ -32,7 +30,7 @@
 	<style type="text/css" media="screen">
 		body { padding:20px;}
 	</style>
-	
+
 </head>
 <body>
 	<div id="editor">

Modified: ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte.src.html
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte.src.html?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte.src.html (original)
+++ ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/elrte-1.3/src/elrte.src.html Thu Oct 25 05:04:09 2012
@@ -7,9 +7,7 @@
 	<title>elRTE from source</title>
 
 	<!-- jQuery and UI -->
-	<script src="../js/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
-	<script src="../js/jquery-ui-1.8.13.custom.min.js" type="text/javascript" charset="utf-8"></script>
-	<link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
+	<link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.22.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
 
 	<!-- CSS for widgets -->
 	<link rel="stylesheet" href="ellib/css/elcommon.css" type="text/css" media="screen" charset="utf-8">
@@ -198,7 +196,7 @@
 
 		});
 	</script>
-	
+
 	<style type="text/css" media="screen">
 		body { padding: 0 20px; }
 		.button { display:inline-block; border:1px solid #ccc; background:#eee; padding:5px; margin:10px; }
@@ -252,7 +250,7 @@ DOUGLAS ADAMS - The Hitchhiker's Guide t
 				<img src="elrte/images/media-director.png" alt="Marvin">
 				<!-- pagebreak -->
 <b>Вот что сообщает <a href="http://google.com">Галактический Путеводитель</a> на предмет <span style="background-color: rgb(255, 255, 153);">полотенец</span>:</b>
-Полотенце, возможно, самый необходимый предмет ! для межзвездного путешественника. Оно имеет некоторую практическую ценность - вы можете: завернуться в него, чтобы согреться, прыгая по холодным лунам Джаглан-Беты; использовать его, как подстилку,лежа на мраморном песке пляжей СантрÐ
 °Ð³Ð¸Ð½ÑƒÑÐ° V и вдыхая пьянящий морской воздух;  спать на нем под огненно-красными звездами на пустынной планете Какрафун; сделать из него парус, чтобы спуститься на плоту по ленивой реке Мотт; намочить его и завязать узлом, чтобы использовать, как оружие в рукопашной; обвязать им голову, чт�
 �¾Ð±Ñ‹ избежать ядовитого дыма или взгляда Прожорного Заглотозавера с Трааля 
+Полотенце, возможно, самый необходимый предмет ! для межзвездного путешественника. Оно имеет некоторую практическую ценность - вы можете: завернуться в него, чтобы согреться, прыгая по холодным лунам Джаглан-Беты; использовать его, как подстилку,лежа на мраморном песке пляжей СантрÐ
 °Ð³Ð¸Ð½ÑƒÑÐ° V и вдыхая пьянящий морской воздух;  спать на нем под огненно-красными звездами на пустынной планете Какрафун; сделать из него парус, чтобы спуститься на плоту по ленивой реке Мотт; намочить его и завязать узлом, чтобы использовать, как оружие в рукопашной; обвязать им голову, чт�
 �¾Ð±Ñ‹ избежать ядовитого дыма или взгляда Прожорного Заглотозавера с Трааля
 	</div>
 	<input type="submit" name="" value="go" id="">
 	</form>

Modified: ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js (original)
+++ ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js Thu Oct 25 05:04:09 2012
@@ -1,5 +1,9 @@
-/**
- * jQuery Validation Plugin 1.9.0
+/*! jQuery Validation Plugin - v1.10.0 - 9/7/2012
+* https://github.com/jzaefferer/jquery-validation
+* Copyright (c) 2012 Jörn Zaefferer; Licensed MIT, GPL */
+
+/*!
+ * jQuery Validation Plugin 1.10.0
  *
  * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
  * http://docs.jquery.com/Plugins/Validation
@@ -16,30 +20,32 @@
 	function stripHtml(value) {
 		// remove html tags and space chars
 		return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
-		// remove numbers and punctuation
-		.replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
+		// remove punctuation
+		.replace(/[.(),;:!?%#$'"_+=\/-]*/g,'');
 	}
 	jQuery.validator.addMethod("maxWords", function(value, element, params) {
-	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params;
+		return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
 	}, jQuery.validator.format("Please enter {0} words or less."));
 
 	jQuery.validator.addMethod("minWords", function(value, element, params) {
-	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
+		return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
 	}, jQuery.validator.format("Please enter at least {0} words."));
 
 	jQuery.validator.addMethod("rangeWords", function(value, element, params) {
-	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
+		var valueStripped = stripHtml(value);
+		var regex = /\b\w+\b/g;
+		return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
 	}, jQuery.validator.format("Please enter between {0} and {1} words."));
 
 })();
 
 jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
-	return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
+	return this.optional(element) || /^[a-z\-.,()'\"\s]+$/i.test(value);
 }, "Letters or punctuation only please");
 
 jQuery.validator.addMethod("alphanumeric", function(value, element) {
 	return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, spaces or underscores only please");
+}, "Letters, numbers, and underscores only please");
 
 jQuery.validator.addMethod("lettersonly", function(value, element) {
 	return this.optional(element) || /^[a-z]+$/i.test(value);
@@ -50,114 +56,113 @@ jQuery.validator.addMethod("nowhitespace
 }, "No white space please");
 
 jQuery.validator.addMethod("ziprange", function(value, element) {
-	return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
+	return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
 }, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
 
+jQuery.validator.addMethod("zipcodeUS", function(value, element) {
+	return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value)
+}, "The specified US ZIP Code is invalid");
+
 jQuery.validator.addMethod("integer", function(value, element) {
 	return this.optional(element) || /^-?\d+$/.test(value);
 }, "A positive or negative non-decimal number please");
 
 /**
-* Return true, if the value is a valid vehicle identification number (VIN).
-*
-* Works with all kind of text inputs.
-*
-* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
-* @desc Declares a required input element whose value must be a valid vehicle identification number.
-*
-* @name jQuery.validator.methods.vinUS
-* @type Boolean
-* @cat Plugins/Validate/Methods
-*/
-jQuery.validator.addMethod(
-	"vinUS",
-	function(v){
-		if (v.length != 17)
-			return false;
-		var i, n, d, f, cd, cdv;
-		var LL    = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
-		var VL    = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
-		var FL    = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
-		var rs    = 0;
-		for(i = 0; i < 17; i++){
-		    f = FL[i];
-		    d = v.slice(i,i+1);
-		    if(i == 8){
-		        cdv = d;
-		    }
-		    if(!isNaN(d)){
-		        d *= f;
-		    }
-		    else{
-		        for(n = 0; n < LL.length; n++){
-		            if(d.toUpperCase() === LL[n]){
-		                d = VL[n];
-		                d *= f;
-		                if(isNaN(cdv) && n == 8){
-		                    cdv = LL[n];
-		                }
-		                break;
-		            }
-		        }
-		    }
-		    rs += d;
-		}
-		cd = rs % 11;
-		if(cd == 10){cd = "X";}
-		if(cd == cdv){return true;}
+ * Return true, if the value is a valid vehicle identification number (VIN).
+ *
+ * Works with all kind of text inputs.
+ *
+ * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
+ * @desc Declares a required input element whose value must be a valid vehicle identification number.
+ *
+ * @name jQuery.validator.methods.vinUS
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+jQuery.validator.addMethod("vinUS", function(v) {
+	if (v.length != 17) {
 		return false;
-	},
-	"The specified vehicle identification number (VIN) is invalid."
-);
+	}
+	var i, n, d, f, cd, cdv;
+	var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
+	var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
+	var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
+	var rs = 0;
+	for(i = 0; i < 17; i++){
+		f = FL[i];
+		d = v.slice(i,i+1);
+		if (i == 8) {
+			cdv = d;
+		}
+		if (!isNaN(d)) {
+			d *= f;
+		} else {
+			for (n = 0; n < LL.length; n++) {
+				if (d.toUpperCase() === LL[n]) {
+					d = VL[n];
+					d *= f;
+					if (isNaN(cdv) && n == 8) {
+						cdv = LL[n];
+					}
+					break;
+				}
+			}
+		}
+		rs += d;
+	}
+	cd = rs % 11;
+	if (cd == 10) {
+		cd = "X";
+	}
+	if (cd == cdv) {
+		return true;
+	}
+	return false;
+}, "The specified vehicle identification number (VIN) is invalid.");
 
 /**
-  * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
-  *
-  * @example jQuery.validator.methods.date("01/01/1900")
-  * @result true
-  *
-  * @example jQuery.validator.methods.date("01/13/1990")
-  * @result false
-  *
-  * @example jQuery.validator.methods.date("01.01.1900")
-  * @result false
-  *
-  * @example <input name="pippo" class="{dateITA:true}" />
-  * @desc Declares an optional input element whose value must be a valid date.
-  *
-  * @name jQuery.validator.methods.dateITA
-  * @type Boolean
-  * @cat Plugins/Validate/Methods
-  */
-jQuery.validator.addMethod(
-	"dateITA",
-	function(value, element) {
-		var check = false;
-		var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
-		if( re.test(value)){
-			var adata = value.split('/');
-			var gg = parseInt(adata[0],10);
-			var mm = parseInt(adata[1],10);
-			var aaaa = parseInt(adata[2],10);
-			var xdata = new Date(aaaa,mm-1,gg);
-			if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
-				check = true;
-			else
-				check = false;
-		} else
+ * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
+ *
+ * @example jQuery.validator.methods.date("01/01/1900")
+ * @result true
+ *
+ * @example jQuery.validator.methods.date("01/13/1990")
+ * @result false
+ *
+ * @example jQuery.validator.methods.date("01.01.1900")
+ * @result false
+ *
+ * @example <input name="pippo" class="{dateITA:true}" />
+ * @desc Declares an optional input element whose value must be a valid date.
+ *
+ * @name jQuery.validator.methods.dateITA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+jQuery.validator.addMethod("dateITA", function(value, element) {
+	var check = false;
+	var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
+	if( re.test(value)){
+		var adata = value.split('/');
+		var gg = parseInt(adata[0],10);
+		var mm = parseInt(adata[1],10);
+		var aaaa = parseInt(adata[2],10);
+		var xdata = new Date(aaaa,mm-1,gg);
+		if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
+			check = true;
+		else
 			check = false;
-		return this.optional(element) || check;
-	},
-	"Please enter a correct date"
-);
+	} else
+		check = false;
+	return this.optional(element) || check;
+}, "Please enter a correct date");
 
 jQuery.validator.addMethod("dateNL", function(value, element) {
-		return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
-	}, "Vul hier een geldige datum in."
-);
+	return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
+}, "Vul hier een geldige datum in.");
 
 jQuery.validator.addMethod("time", function(value, element) {
-	return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(value);
+	return this.optional(element) || /^([0-1]\d|2[0-3]):([0-5]\d)$/.test(value);
 }, "Please enter a valid time, between 00:00 and 23:59");
 jQuery.validator.addMethod("time12h", function(value, element) {
 	return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(value);
@@ -170,10 +175,8 @@ jQuery.validator.addMethod("time12h", fu
  * allows '-' or ' ' as a separator and allows parens around area code
  * some people may want to put a '1' in front of their number
  *
- * 1(212)-999-2345
- * or
- * 212 999 2344
- * or
+ * 1(212)-999-2345 or
+ * 212 999 2344 or
  * 212-999-0983
  *
  * but not
@@ -182,21 +185,42 @@ jQuery.validator.addMethod("time12h", fu
  * 212 123 4567
  */
 jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
-    phone_number = phone_number.replace(/\s+/g, "");
+	phone_number = phone_number.replace(/\s+/g, "");
 	return this.optional(element) || phone_number.length > 9 &&
-		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
+		phone_number.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
 }, "Please specify a valid phone number");
 
 jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
-return this.optional(element) || phone_number.length > 9 &&
-phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
+	phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+	return this.optional(element) || phone_number.length > 9 &&
+		phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:(?:\d{5}\)?\s?\d{4,5})|(?:\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3}))|(?:\d{3}\)?\s?\d{3}\s?\d{3,4})|(?:\d{2}\)?\s?\d{4}\s?\d{4}))$/);
 }, 'Please specify a valid phone number');
 
 jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
-return this.optional(element) || phone_number.length > 9 &&
-phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
+	phone_number = phone_number.replace(/\s+|-/g,'');
+	return this.optional(element) || phone_number.length > 9 &&
+		phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
 }, 'Please specify a valid mobile number');
 
+//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+jQuery.validator.addMethod('phonesUK', function(phone_number, element) {
+	phone_number = phone_number.replace(/\s+|-/g,'');
+	return this.optional(element) || phone_number.length > 9 &&
+		phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/);
+}, 'Please specify a valid uk phone number');
+// On the above three UK functions, do the following server side processing:
+//  Compare with ^((?:00\s?|\+)(44)\s?)?\(?0?(?:\)\s?)?([1-9]\d{1,4}\)?[\d\s]+)
+//  Extract $2 and set $prefix to '+44<space>' if $2 is '44' otherwise set $prefix to '0'
+//  Extract $3 and remove spaces and parentheses. Phone number is combined $2 and $3.
+// A number of very detailed GB telephone number RegEx patterns can also be found at:
+// http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_UK_Telephone_Numbers
+
+//Matches UK postcode. based on http://snipplr.com/view/3152/postcode-validation/
+jQuery.validator.addMethod('postcodeUK', function(postcode, element) {
+	postcode = (postcode.toUpperCase()).replace(/\s+/g,'');
+	return this.optional(element) || postcode.match(/^([^QZ][^IJZ]{0,1}\d{1,2})(\d[^CIKMOV]{2})$/) || postcode.match(/^([^QV]\d[ABCDEFGHJKSTUW])(\d[^CIKMOV]{2})$/) || postcode.match(/^([^QV][^IJZ]\d[ABEHMNPRVWXY])(\d[^CIKMOV]{2})$/) || postcode.match(/^(GIR)(0AA)$/) || postcode.match(/^(BFPO)(\d{1,4})$/) || postcode.match(/^(BFPO)(C\/O\d{1,3})$/);
+}, 'Please specify a valid postcode');
+
 // TODO check if value starts with <, otherwise don't try stripping anything
 jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
 	return jQuery(value).text().length >= param;
@@ -216,9 +240,9 @@ jQuery.validator.addMethod("url2", funct
 // Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
 // Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
 jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
-
-	if (/[^0-9-]+/.test(value))
+	if (/[^0-9-]+/.test(value)) {
 		return false;
+	}
 
 	value = value.replace(/\D/g, "");
 
@@ -243,19 +267,19 @@ jQuery.validator.addMethod("creditcardty
 	if (param.all)
 		validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
 
-	if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
+	if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
 		return value.length == 16;
 	}
 	if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
 		return value.length == 16;
 	}
-	if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
+	if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
 		return value.length == 15;
 	}
-	if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
+	if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
 		return value.length == 14;
 	}
-	if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
+	if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
 		return value.length == 15;
 	}
 	if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
@@ -274,27 +298,140 @@ jQuery.validator.addMethod("creditcardty
 }, "Please enter a valid credit card number.");
 
 jQuery.validator.addMethod("ipv4", function(value, element, param) {
-    return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
+		return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
 }, "Please enter a valid IP v4 address.");
 
 jQuery.validator.addMethod("ipv6", function(value, element, param) {
-    return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
+		return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
 }, "Please enter a valid IP v6 address.");
 
 /**
-  * Return true if the field value matches the given format RegExp
-  *
-  * @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
-  * @result true
-  *
-  * @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
-  * @result false
-  *
-  * @name jQuery.validator.methods.pattern
-  * @type Boolean
-  * @cat Plugins/Validate/Methods
-  */
+* Return true if the field value matches the given format RegExp
+*
+* @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
+* @result true
+*
+* @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
+* @result false
+*
+* @name jQuery.validator.methods.pattern
+* @type Boolean
+* @cat Plugins/Validate/Methods
+*/
 jQuery.validator.addMethod("pattern", function(value, element, param) {
-    return this.optional(element) || param.test(value);
+	if (this.optional(element)) {
+		return true;
+	}
+	if (typeof param === 'string') {
+		param = new RegExp('^(?:' + param + ')$');
+	}
+	return param.test(value);
 }, "Invalid format.");
 
+
+/*
+ * Lets you say "at least X inputs that match selector Y must be filled."
+ *
+ * The end result is that neither of these inputs:
+ *
+ *  <input class="productinfo" name="partnumber">
+ *  <input class="productinfo" name="description">
+ *
+ *  ...will validate unless at least one of them is filled.
+ *
+ * partnumber:  {require_from_group: [1,".productinfo"]},
+ * description: {require_from_group: [1,".productinfo"]}
+ *
+ */
+jQuery.validator.addMethod("require_from_group", function(value, element, options) {
+	var validator = this;
+	var selector = options[1];
+	var validOrNot = $(selector, element.form).filter(function() {
+		return validator.elementValue(this);
+	}).length >= options[0];
+
+	if(!$(element).data('being_validated')) {
+		var fields = $(selector, element.form);
+		fields.data('being_validated', true);
+		fields.valid();
+		fields.data('being_validated', false);
+	}
+	return validOrNot;
+}, jQuery.format("Please fill at least {0} of these fields."));
+
+/*
+ * Lets you say "either at least X inputs that match selector Y must be filled,
+ * OR they must all be skipped (left blank)."
+ *
+ * The end result, is that none of these inputs:
+ *
+ *  <input class="productinfo" name="partnumber">
+ *  <input class="productinfo" name="description">
+ *  <input class="productinfo" name="color">
+ *
+ *  ...will validate unless either at least two of them are filled,
+ *  OR none of them are.
+ *
+ * partnumber:  {skip_or_fill_minimum: [2,".productinfo"]},
+ *  description: {skip_or_fill_minimum: [2,".productinfo"]},
+ * color:       {skip_or_fill_minimum: [2,".productinfo"]}
+ *
+ */
+jQuery.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
+	var validator = this;
+
+	numberRequired = options[0];
+	selector = options[1];
+	var numberFilled = $(selector, element.form).filter(function() {
+		return validator.elementValue(this);
+	}).length;
+	var valid = numberFilled >= numberRequired || numberFilled === 0;
+
+	if(!$(element).data('being_validated')) {
+		var fields = $(selector, element.form);
+		fields.data('being_validated', true);
+		fields.valid();
+		fields.data('being_validated', false);
+	}
+	return valid;
+}, jQuery.format("Please either skip these fields or fill at least {0} of them."));
+
+// Accept a value from a file input based on a required mimetype
+jQuery.validator.addMethod("accept", function(value, element, param) {
+	// Split mime on commas incase we have multiple types we can accept
+	var typeParam = typeof param === "string" ? param.replace(/,/g, '|') : "image/*",
+	optionalValue = this.optional(element),
+	i, file;
+
+	// Element is optional
+	if(optionalValue) {
+		return optionalValue;
+	}
+
+	if($(element).attr("type") === "file") {
+		// If we are using a wildcard, make it regex friendly
+		typeParam = typeParam.replace("*", ".*");
+
+		// Check if the element has a FileList before checking each file
+		if(element.files && element.files.length) {
+			for(i = 0; i < element.files.length; i++) {
+				file = element.files[i];
+
+				// Grab the mimtype from the loaded file, verify it matches
+				if(!file.type.match(new RegExp( ".?(" + typeParam + ")$", "i"))) {
+					return false;
+				}
+			}
+		}
+	}
+
+	// Either return true because we've validated each file, or because the
+	// browser does not support element.files and the FileList feature
+	return true;
+}, jQuery.format("Please enter a value with a valid mimetype."));
+
+// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
+jQuery.validator.addMethod("extension", function(value, element, param) {
+	param = typeof param === "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
+	return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+}, jQuery.format("Please enter a value with a valid extension."));

Modified: ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js?rev=1401975&r1=1401974&r2=1401975&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js (original)
+++ ofbiz/branches/20120329_portletWidget/framework/images/webapp/images/jquery/plugins/validate/additional-methods.min.js Thu Oct 25 05:04:09 2012
@@ -1,29 +1,4 @@
-/**
- * jQuery Validation Plugin 1.9.0
- *
- * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
- * http://docs.jquery.com/Plugins/Validation
- *
- * Copyright (c) 2006 - 2011 Jörn Zaefferer
- *
- * Dual licensed under the MIT and GPL licenses:
- *   http://www.opensource.org/licenses/mit-license.php
- *   http://www.gnu.org/licenses/gpl.html
- */
-(function(){function a(b){return b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,"")}jQuery.validator.addMethod("maxWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length<d},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",
-function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d[0]&&b.match(/bw+b/g).length<d[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})();jQuery.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z-.,()'\"\s]+$/i.test(a)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, spaces or underscores only please");
-jQuery.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please");jQuery.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
-jQuery.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please");
-jQuery.validator.addMethod("vinUS",function(a){if(a.length!=17)return false;var b,c,d,f,e,g=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],h=0;for(b=0;b<17;b++){f=j[b];d=a.slice(b,b+1);if(b==8)e=d;if(isNaN(d))for(c=0;c<g.length;c++){if(d.toUpperCase()===g[c]){d=i[c];d*=f;if(isNaN(e)&&c==8)e=g[c];break}}else d*=f;h+=d}a=h%11;if(a==10)a="X";if(a==e)return true;return false},
-"The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(a,b){var c=false;if(/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(a)){var d=a.split("/");c=parseInt(d[0],10);var f=parseInt(d[1],10);d=parseInt(d[2],10);var e=new Date(d,f-1,c);c=e.getFullYear()==d&&e.getMonth()==f-1&&e.getDate()==c?true:false}else c=false;return this.optional(b)||c},"Please enter a correct date");
-jQuery.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(a)},"Vul hier een geldige datum in.");jQuery.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59");jQuery.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(a)},"Please enter a valid time, between 00:00 am and 12:00 pm");
-jQuery.validator.addMethod("phoneUS",function(a,b){a=a.replace(/\s+/g,"");return this.optional(b)||a.length>9&&a.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/)},"Please specify a valid phone number");
-jQuery.validator.addMethod("mobileUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("strippedminlength",function(a,b,c){return jQuery(a).text().length>=c},jQuery.validator.format("Please enter at least {0} characters"));
-jQuery.validator.addMethod("email2",function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(
 a)},jQuery.validator.messages.email);
-jQuery.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$
 &'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
-jQuery.validator.messages.url);
-jQuery.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9-]+/.test(a))return false;a=a.replace(/\D/g,"");b=0;if(c.mastercard)b|=1;if(c.visa)b|=2;if(c.amex)b|=4;if(c.dinersclub)b|=8;if(c.enroute)b|=16;if(c.discover)b|=32;if(c.jcb)b|=64;if(c.unknown)b|=128;if(c.all)b=255;if(b&1&&/^(51|52|53|54|55)/.test(a))return a.length==16;if(b&2&&/^(4)/.test(a))return a.length==16;if(b&4&&/^(34|37)/.test(a))return a.length==15;if(b&8&&/^(300|301|302|303|304|305|36|38)/.test(a))return a.length==14;if(b&
-16&&/^(2014|2149)/.test(a))return a.length==15;if(b&32&&/^(6011)/.test(a))return a.length==16;if(b&64&&/^(3)/.test(a))return a.length==16;if(b&64&&/^(2131|1800)/.test(a))return a.length==15;if(b&128)return true;return false},"Please enter a valid credit card number.");
-jQuery.validator.addMethod("ipv4",function(a,b){return this.optional(b)||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(a)},"Please enter a valid IP v4 address.");
-jQuery.validator.addMethod("ipv6",function(a,b){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address.")
 ;
-jQuery.validator.addMethod("pattern",function(a,b,c){return this.optional(b)||c.test(a)},"Invalid format.");
+/*! jQuery Validation Plugin - v1.10.0 - 9/7/2012
+* https://github.com/jzaefferer/jquery-validation
+* Copyright (c) 2012 Jörn Zaefferer; Licensed MIT, GPL */
+(function(){function a(a){return a.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'"_+=\/-]*/g,"")}jQuery.validator.addMethod("maxWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length<=d},jQuery.validator.format("Please enter {0} words or less.")),jQuery.validator.addMethod("minWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d},jQuery.validator.format("Please enter at least {0} words.")),jQuery.validator.addMethod("rangeWords",function(b,c,d){var e=a(b),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})(),jQuery.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z\-.,()'\"\s]+$/i.test(a)},"Letters or punctuation only please"),jQuery.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, and und
 erscores only please"),jQuery.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please"),jQuery.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),jQuery.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2\}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"),jQuery.validator.addMethod("zipcodeUS",function(a,b){return this.optional(b)||/\d{5}-\d{4}$|^\d{5}$/.test(a)},"The specified US ZIP Code is invalid"),jQuery.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please"),jQuery.validator.addMethod("vinUS",function(a){if(a.length!=17)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4
 ,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){e=j[b],d=a.slice(b,b+1),b==8&&(g=d);if(!isNaN(d))d*=e;else for(c=0;c<h.length;c++)if(d.toUpperCase()===h[c]){d=i[c],d*=e,isNaN(g)&&c==8&&(g=h[c]);break}k+=d}return f=k%11,f==10&&(f="X"),f==g?!0:!1},"The specified vehicle identification number (VIN) is invalid."),jQuery.validator.addMethod("dateITA",function(a,b){var c=!1,d=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(d.test(a)){var e=a.split("/"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=new Date(h,g-1,f);i.getFullYear()==h&&i.getMonth()==g-1&&i.getDate()==f?c=!0:c=!1}else c=!1;return this.optional(b)||c},"Please enter a correct date"),jQuery.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(a)},"Vul hier een geldige datum in."),jQuery.validator.addMethod("time",function(a,b){return this.optional(b)||/^([0-1]\d|2[0-3]):([0-5]\d)$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),jQuery.validator.
 addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(a)},"Please enter a valid time, between 00:00 am and 12:00 pm"),jQuery.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:(?:\d{5}\)?\s?\d{4,5})|(?:\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3}))|(?:\d{3}\)?\s?\d{3}\s?\d{3,4})|(?:\d{2}\)?\s?\d{4}\s?\d{4}))$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),jQuery.validator.addMethod("
 phonesUK",function(a,b){return a=a.replace(/\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),jQuery.validator.addMethod("postcodeUK",function(a,b){return a=a.toUpperCase().replace(/\s+/g,""),this.optional(b)||a.match(/^([^QZ][^IJZ]{0,1}\d{1,2})(\d[^CIKMOV]{2})$/)||a.match(/^([^QV]\d[ABCDEFGHJKSTUW])(\d[^CIKMOV]{2})$/)||a.match(/^([^QV][^IJZ]\d[ABEHMNPRVWXY])(\d[^CIKMOV]{2})$/)||a.match(/^(GIR)(0AA)$/)||a.match(/^(BFPO)(\d{1,4})$/)||a.match(/^(BFPO)(C\/O\d{1,3})$/)},"Please specify a valid postcode"),jQuery.validator.addMethod("strippedminlength",function(a,b,c){return jQuery(a).text().length>=c},jQuery.validator.format("Please enter at least {0} characters")),jQuery.validator.addMethod("email2",function(a,b,c){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\
 ?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},jQuery.validator.messages.email),jQuery.validator.addMethod("url2",function(a,b,c){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF
 ])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*
 )?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},jQuery.validator.messages.url),jQuery.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),d&1&&/^(5[12345])/.test(a)?a.length==16:d&2&&/^(4)/.test(a)?a.length==16:d&4&&/^(3[47])/.test(a)?a.length==15:d&8&&/^(3(0[012345]|[68]))/.test(a)?a.length==14:d&16&&/^(2(014|149))/.test(a)?a.length==15:d&32&&/^(6011)/.test(a)?a.length==16:d&64&&/^(3)/.test(a)?a.length==16:d&64&&/^(2131|1800)/.test(a)?a.length==15:d&128?!0:!1},"Please enter a valid credit card number."),jQuery.validator.addMethod("ipv4",function(a,b,c){return this.optional(b)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?
 )\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(a)},"Please enter a valid IP v4 address."),jQuery.validator.addMethod("ipv6",function(a,b,c){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]
 {1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address."),jQuery.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:(typeof c=="string"&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),jQuery.validator.addMethod("require_from_group",function(a,b,c){var d=this,e=c[1],f=$(e,b.form).filter(function(){return d.elementValue(this)}).length>=c[0];if(!$(b).data("being_validated")){var g=$(e,b.form);g.data("being_validated",!0),g.valid(),g.data("being_validated",!1)}return f},jQuery.format("Please fill at least {0} of these fields.")),jQuery.validator.addMethod("skip_or_fill_minimum",function(a,b,c){var d=this;numberRequired=c[0],selector=c[1];var e=$(selector,b.form).filter(function(){return d.elementValue(this)}).length,f=e>=numberRequired||e===0;if(!$(b).data("being_validated")){var g=$(selector,b.form);g.data("being_validated",!0),g.valid(),g.data("being_validated",!1)}return f},jQuery.format("Please either skip thes
 e fields or fill at least {0} of them.")),jQuery.validator.addMethod("accept",function(a,b,c){var d=typeof c=="string"?c.replace(/,/g,"|"):"image/*",e=this.optional(b),f,g;if(e)return e;if($(b).attr("type")==="file"){d=d.replace("*",".*");if(b.files&&b.files.length)for(f=0;f<b.files.length;f++){g=b.files[f];if(!g.type.match(new RegExp(".?("+d+")$","i")))return!1}}return!0},jQuery.format("Please enter a value with a valid mimetype.")),jQuery.validator.addMethod("extension",function(a,b,c){return c=typeof c=="string"?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp(".("+c+")$","i"))},jQuery.format("Please enter a value with a valid extension."))
\ No newline at end of file