=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js 2013-12-19 06:41:31 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js 2013-12-30 03:19:24 +0000 @@ -14,13 +14,16 @@ { var count = 0; for ( i in json.programs ) { - jQuery( '#programIdAddPatient').append( '' ); + if( json.programs[i].type==2){ + jQuery( '#programIdAddPatient').append( '' ); + count++; + } } - if(json.programs.length==0){ + if(count==0){ jQuery( '#programIdAddPatient').prepend( '' ); } - else if(json.programs.length>1){ + else if(count>1){ jQuery( '#programIdAddPatient').prepend( '' ); } === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2013-12-18 06:05:41 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2013-12-30 03:19:24 +0000 @@ -30,12 +30,8 @@ #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) ) #foreach( $identifierType in $identifierTypes) #end #if( $identifierTypes.size()==0 ) #end - - - #end #if($mapPatientOrgunit.size()!=0) #end - === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2013-12-18 08:01:59 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2013-12-30 03:19:24 +0000 @@ -6,14 +6,11 @@ item.remove(); } }); - if(jQuery("#programIdAddPatient option").length==0) + if(jQuery("#programIdAddPatient option").length==1) { + jQuery("#programIdAddPatient [value=]").remove(); jQuery( '#programIdAddPatient').append( '' ); } - else if(jQuery("#programIdAddPatient option").length==1) - { - jQuery("#programIdAddPatient [value=]").remove(); - } disable('advancedSearchBtn'); hideById('removeEventLink'); @@ -22,6 +19,7 @@ $("#searchObjectId option[value='prg']").remove(); setFieldValue('startDueDate',''); setFieldValue('endDueDate',''); + showById('advancedSearchBtn'); });