------------------------------------------------------------
revno: 13598
committer: Lars Helge Ă˜verland <[email protected]>
branch nick: dhis2
timestamp: Mon 2014-01-06 22:08:22 +0100
message:
Fixed bug with add person add and register new function
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
--
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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2014-01-06 18:15:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2014-01-06 21:08:22 +0000
@@ -166,7 +166,7 @@
var enrollmentDate = jQuery('#patientForm [id=enrollmentDate]').val();
// Enroll patient into the program
- if( programId !='' && enrollmentDate != '')
+ if( programId && enrollmentDate )
{
jQuery.postJSON( "saveProgramEnrollment.action",
{
@@ -179,13 +179,16 @@
{
if(isContinue){
jQuery("#patientForm :input").each( function(){
- if( $(this).attr('type') != 'button'
- && $(this).attr('type') != 'submit'
- && $(this).attr('id') !='enrollmentDate' )
+ var type = $(this).attr('type'),
+ id = $(this).attr('id');
+
+ if( type != 'button' && type != 'submit' && id != 'enrollmentDate' )
{
$(this).val("");
}
});
+ $("#patientForm :input").prop("disabled", false);
+ $("#patientForm").find("select").prop("disabled", false);
}
else{
showPatientDashboardForm( patientUid );
@@ -194,14 +197,16 @@
}
else if(isContinue){
jQuery("#patientForm :input").each( function(){
- if( $(this).attr('type') != 'button'
- && $(this).attr('type') != 'submit' )
+ var type = $(this).attr('type'),
+ id = $(this).attr('id');
+
+ if( type != 'button' && type != 'submit' && id != 'enrollmentDate' )
{
$(this).val("");
}
});
- $("#patientForm :input").attr("disabled", false);
- $("#patientForm").find("select").attr("disabled", false);
+ $("#patientForm :input").prop("disabled", false);
+ $("#patientForm").find("select").prop("disabled", false);
}
else
{
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp