← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2206: fix bug: Remove the old calendar into underAgeForm.

 

------------------------------------------------------------
revno: 2206
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2010-11-29 15:15:17 +0700
message:
  fix bug: Remove the old calendar into underAgeForm.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm	2010-11-29 07:56:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm	2010-11-29 08:15:17 +0000
@@ -35,12 +35,17 @@
 			birthDate :{required:false,dateISO:true,datelessthanequaltoday:true}
 		},beforeValidateHandler: function(form)
 			{
-				var birthDate = $('#birthDate').val();
-				var age = $('#age').val();
-				if(age !=''){
-					$( "#memberValidator").val(age);
+				var dobType = $('#dobType').val();
+						
+				if( dobType=='V' || dobType=='D' ) 
+				{
+					var birthDate = $('#birthDate').val();
+					if( birthDate != '' ){
+						$("#memberValidator").val(birthDate);
+					}
 				}else{
-					$( "#memberValidator").val(birthDate);
+					var age = $('#age').val();
+					$("#memberValidator").val(age);
 				}
 			}
 	});