Don't require states for non-US/CA orders.  Some countries don't have 
states or provinces.

        Patch by mark. 

diffs (15 lines):

diff -r e0b133ed81ff -r 108599c7bc5f htdocs/shop/entercc.bml
--- a/htdocs/shop/entercc.bml   Wed Apr 14 16:42:56 2010 -0500
+++ b/htdocs/shop/entercc.bml   Sun Apr 18 21:48:12 2010 +0000
@@ -157,9 +157,8 @@ body<=
 
     # if US, then US state must be selected
     $err{state} = $ML{'.error.required'}
-        if $in{country} eq 'US' && $POST{usstate} !~ /^\w\w$/;
-    $err{state} = $ML{'.error.required'}
-        if $in{country} ne 'US' && $POST{otherstate} !~ /\S/;
+        if ( $in{country} eq 'US' && $POST{usstate} !~ /^\w\w$/ ) ||
+           ( $in{country} eq 'CA' && $POST{otherstate} !~ /\S/ );
 
     # if there are any errors in fields (some required but not given) then
     # we return to handle the form now
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to