dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07749
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2273: Minor fix.
------------------------------------------------------------
revno: 2273
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-09-29 15:48:39 +0700
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm
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/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2010-09-28 09:06:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2010-09-29 08:48:39 +0000
@@ -91,7 +91,7 @@
<input type="text" id="birthDate" name="birthDate" style="width:10em" onchange="bdOnchange()" >
<label for="age">$i18n.getString( "or" ) $i18n.getString( "age" ) </label>
- <input type="text" id="age" name="age" style="width:4em" onchange="ageOnchange()" class="{validate:{number:true, alphanumeric: true}}">
+ <input type="text" id="age" name="age" style="width:4em" onchange="ageOnchange()" class="{validate:{number:true, alphanumeric: true}}">
<label for="estimated">$i18n.getString( "estimated" )</label>
<input type="checkbox" id="birthDateEstimated" name="birthDateEstimated" value="true">
=== 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-09-27 12:49:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm 2010-09-29 08:48:39 +0000
@@ -31,8 +31,17 @@
middleName : {required:false, letterswithbasicpunc: true},
lastName : {required:false, letterswithbasicpunc: true},
gender : { required: true },
- birthDate :{required:true,dateISO:true,datelessthanequaltoday:true}
- }
+ birthDate :{required:false,dateISO:true,datelessthanequaltoday:true}
+ },beforeValidateHandler: function(form)
+ {
+ var birthDate = $('#birthDate').val();
+ var age = $('#age').val();
+ if(age !=''){
+ $( "#memberValidator").val(age);
+ }else{
+ $( "#memberValidator").val(birthDate);
+ }
+ }
});
// Esc key for jQuery thickbox
@@ -187,12 +196,16 @@
</tr>
<tr>
<td><label for="age">$i18n.getString( "or" ) $i18n.getString( "age" ) </label></td>
- <td><input type="text" id="age" name="age" style="width:4em" onchange="ageOnchange()" class="{validate:{number:true}}">
+ <td><input type="text" id="age" name="age" style="width:4em" onchange="ageOnchange()" class="{validate:{number:true, alphanumeric: true}}">
<label for="estimated">$i18n.getString( "estimated" )</label>
<input type="checkbox" id="birthDateEstimated" name="birthDateEstimated" value="true">
</td>
</tr>
+ <tr>
+ <td></td>
+ <td><input id="memberValidator" style="display:none" class="{validate:{required:true}}"/></td>
+ </tr>
<tr>
<td><label for="bloodGroup">$i18n.getString( "blood_group" )</label></td>
<td>