[Movecommons-commits] r515 - trunk/src
Mario Gallegos
mgallegos at ourproject.org
Fri Sep 21 21:18:24 CEST 2012
Author: mgallegos
Date: 2012-09-21 21:18:23 +0200 (Fri, 21 Sep 2012)
New Revision: 515
Modified:
trunk/src/mc-dia-form2.js
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-09-20 20:07:27 UTC (rev 514)
+++ trunk/src/mc-dia-form2.js 2012-09-21 19:18:23 UTC (rev 515)
@@ -603,7 +603,7 @@
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);
+ $j('#non-profit-website').effect("shake", { times:3 }, 50);
error=true;
}
else
@@ -612,16 +612,16 @@
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);
+ $j('#open-accounting-website').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);
+ if($j.trim($j('#donation-website').val())==""){
+ $j('#donation-website').addClass('error');
+ $j('#donation-website').effect("shake", { times:3 }, 50);
error=true;
}
else
@@ -642,34 +642,44 @@
$j('#submit_third').click(function(){
-/* //update progress bar
- $j('#progress_text').html('100% Complete');
- $j('#progress').css('width','339px');
-
- //prepare the fourth step
- var fields = new Array(
- $j('#username').val(),
- $j('#password').val(),
- $j('#email').val(),
- $j('#firstname').val() + ' ' + $j('#lastname').val(),
- $j('#age').val(),
- $j('#gender').val(),
- $j('#country').val()
- );
- var tr = $j('#fourth_step tr');
- tr.each(function(){
- //alert( fields[$(this).index()] )
- $j(this).children('td:nth-child(2)').html(fields[$j(this).index()]);
- });
-
- //slide steps
- $j('#third_step').slideUp();
- $j('#fourth_step').slideDown();
-*/
+
+ var error=false;
+
if($j('#rp-checkbox').val()=='A'){
$j('#step3question').effect("shake", { times:3 }, 50);
return;
}
+
+ if($j("#terms-of-use").attr("checked"))
+ if($j.trim($j('#terms-of-use-website').val())==""){
+ $j('#terms-of-use-website').addClass('error');
+ $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#terms-of-use-website').addClass('valid');
+
+ if($j("#creative-commons").attr("checked"))
+ if($j.trim($j('#creative-commons-website').val())==""){
+ $j('#creative-commons-website').addClass('error');
+ $j('#creative-commons-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#creative-commons-website').addClass('valid');
+
+ if($j("#other-license").attr("checked"))
+ if($j.trim($j('#other-license-website').val())==""){
+ $j('#other-license-website').addClass('error');
+ $j('#other-license-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#other-license-website').addClass('valid');
+
+ if(error)
+ return;
+
//update progress bar
$j('#progress_text').html('60% Complete');
$j('#progress').css('width','204px');
More information about the Movecommons-commits
mailing list