=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-09-17 09:14:41 +0000 @@ -273,14 +273,14 @@ jQuery('#patientForm [name=attr*] select').attr('disabled',true); #end - #if( $auth.hasAccess( "dhis-web-caseentry", "allowEditPatientAttributes" ) ) + #if( $auth.hasAccess( "dhis-web-caseentry", "allowEditPatientIdentifier" ) ) disableButtons = false; #else jQuery('#patientForm [name=idenFields] input').attr('disabled',true); jQuery('#patientForm [name=idenFields] select').attr('disabled',true); #end - #if( $auth.hasAccess( "dhis-web-caseentry", "allowEditPatientIdentifier" ) ) + #if( $auth.hasAccess( "dhis-web-caseentry", "allowEditPatientAttributes" ) ) disableButtons = false; #else jQuery('#patientForm [name=attributesFields] input').attr('disabled',true); === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2013-08-12 06:23:01 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2013-09-17 09:14:41 +0000 @@ -64,7 +64,7 @@ #foreach ($identifierType in $identifierTypes) #set( $identifier = '') #set( $identifier = $identiferMap.get( $identifierType.id ) ) - + @@ -77,7 +77,7 @@ #foreach($attribute in $patientAttributes ) #set( $attributeValue = '') #set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) ) - + #if( $attribute.valueType == "bool" ) @@ -108,7 +108,7 @@   - + @@ -148,6 +148,24 @@ saveCoordinatesEvent($!programStageInstance.id); }); + var disableButtons = true; + #if( $auth.hasAccess( "dhis-web-caseentry", "allowEditPatientIdentifier" ) ) + disableButtons = false; + #else + jQuery('#patientForm [name=idenFields] input').attr('disabled',true); + jQuery('#patientForm [name=idenFields] select').attr('disabled',true); + #end + + #if( $auth.hasAccess( "dhis-web-caseentry", "allowEditPatientAttributes" ) ) + disableButtons = false; + #else + jQuery('#patientForm [name=attributesFields] input').attr('disabled',true); + jQuery('#patientForm [name=attributesFields] select').attr('disabled',true); + #end + + if(disableButtons){ + disabled('saveIdenAndAttrBtn'); + } #if( $programInstance.status==1) jQuery("[id=tab-2] :input").prop('disabled', true); jQuery("[id=tab-3] :input").prop('disabled', true);