[Movecommons-commits] r514 - in trunk: src wp-theme

Mario Gallegos mgallegos at ourproject.org
Thu Sep 20 22:07:28 CEST 2012


Author: mgallegos
Date: 2012-09-20 22:07:27 +0200 (Thu, 20 Sep 2012)
New Revision: 514

Modified:
   trunk/src/mc-dia-form2.js
   trunk/wp-theme/mc2-form.php
Log:


Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js	2012-09-20 19:33:50 UTC (rev 513)
+++ trunk/src/mc-dia-form2.js	2012-09-20 20:07:27 UTC (rev 514)
@@ -592,39 +592,44 @@
     
     
     $j('#submit_second').click(function(){
-        //remove classes
-        /*$j('#second_step input').removeClass('error').removeClass('valid');
-
-        var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;  
-        var fields = $j('#second_step input[type=text]');
-        var error = 0;
-        fields.each(function(){
-            var value = $j(this).val();
-            if( value.length<1 || value==field_values[$j(this).attr('id')] || ( $j(this).attr('id')=='email' && !emailPattern.test(value) ) ) {
-                $j(this).addClass('error');
-                $j(this).effect("shake", { times:3 }, 50);
-                
-                error++;
-            } else {
-                $j(this).addClass('valid');
-            }
-        });
-
-        if(!error) {
-                //update progress bar
-                $j('#progress_text').html('66% Complete');
-                $j('#progress').css('width','226px');
-                
-                //slide steps
-                $j('#second_step').slideUp();
-                $j('#third_step').slideDown();     
-        } else return false;*/
     	
+    	var error=false;
+    	
     	if($j('#np-checkbox').val()=='A'){
     		$j('#step2question').effect("shake", { times:3 }, 50);
     		return;
     	}
-
+    	
+    	if($j("#registered-non-profit").attr("checked"))
+    	    if($j.trim($j('#non-profit-website').val())==""){
+    	    	$j('#non-profit-website').addClass('error');
+    	    	$j(this).effect("shake", { times:3 }, 50);
+    	    	error=true;
+    	    }
+    	    else
+    	    	$j('#non-profit-website').addClass('valid');
+    	
+    	if($j("#open-accounting").attr("checked"))
+    	    if($j.trim($j('#open-accounting-website').val())==""){
+    	    	$j('#open-accounting-website').addClass('error');
+    	    	$j(this).effect("shake", { times:3 }, 50);
+    	    	error=true;
+    	    }
+    	    else
+    	    	$j('#open-accounting-website').addClass('valid');
+    	
+    	if($j("#accept-donations").attr("checked"))
+    	    if($j.trim($j('#accept-donations').val())==""){
+    	    	$j('#accept-donations').addClass('error');
+    	    	$j(this).effect("shake", { times:3 }, 50);
+    	    	error=true;
+    	    }
+    	    else
+    	    	$j('#accept-donations').addClass('valid');
+    	
+    	if(error)
+    		return;
+    	    	
     	//update progress bar
         $j('#progress_text').html('40% Complete');
         $j('#progress').css('width','136px');

Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php	2012-09-20 19:33:50 UTC (rev 513)
+++ trunk/wp-theme/mc2-form.php	2012-09-20 20:07:27 UTC (rev 514)
@@ -398,14 +398,14 @@
 <!--  
 <script type='text/javascript' src='/mc/0.1/jquery.easing.1.3.js'></script>
 <script type='text/javascript' src='/mc/0.1/jquery.bxSlider.js'></script>
+<script type='text/javascript' src='/mc/0.1/jquery.blockUI.js'></script>
+<script type='text/javascript' src='/mc/0.1/jquery.checkbox.min.js'></script>
+<link rel="stylesheet" type="text/css" href="/mc/0.1/jquery.checkbox.css"/>
  -->
 <script type='text/javascript' src='/mc/0.1/jquery.infieldlabel.min.js'></script>
-<script type='text/javascript' src='/mc/0.1/jquery.blockUI.js'></script>
-<script type='text/javascript' src='/mc/0.1/jquery.checkbox.min.js'></script>
 <script type="text/javascript" src="/mc/0.1/jquery.inputfocus-0.9.min.js"></script>
 <script type="text/javascript" src="/mc/0.1/mc-dia-form2.js"></script>
 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/ui-darkness/jquery-ui.css"/>
-<link rel="stylesheet" type="text/css" href="/mc/0.1/jquery.checkbox.css"/>
 <link rel="stylesheet" type="text/css" href="/mc/0.1/mc-dia-form2.css"/>
 
 




More information about the Movecommons-commits mailing list