=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2013-04-12 04:20:19 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2013-04-12 04:35:50 +0000 @@ -251,9 +251,6 @@ public String execute() throws Exception { - organisationUnit = organisationUnitId == null ? selectedStateManager.getSelectedOrganisationUnit() : - organisationUnitService.getOrganisationUnit( organisationUnitId ); - if ( programStageInstanceId != null ) { programStageInstance = programStageInstanceService.getProgramStageInstance( programStageInstanceId ); @@ -293,6 +290,9 @@ if ( programStageInstance != null ) { + organisationUnit = organisationUnitId == null ? selectedStateManager.getSelectedOrganisationUnit() : + organisationUnitService.getOrganisationUnit( organisationUnitId ); + if ( program.isRegistration() ) { patient = programStageInstance.getProgramInstance().getPatient(); === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-04-12 04:20:19 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-04-12 04:35:50 +0000 @@ -102,14 +102,6 @@ updateProgramList( programs ); } ); - - /* - // try online first, then fallback to what we have stored in browser - dhis2.storage.Store.plugins['online-anonymous-programs'].call( {}, function ( arr ) { - updateProgramList( arr ); - }, function () { - } ); - */ } function updateProgramList( arr ) { @@ -652,7 +644,6 @@ var service = (function () { var executionDateStoreInitialized = false; var dataValueStoreInitialized = false; - var formStoreInitialized = false; var executionDateStore = new dhis2.storage.Store( {name: 'anonymousExecutionDate' }, function ( store ) { executionDateStoreInitialized = true; @@ -662,10 +653,6 @@ dataValueStoreInitialized = true; } ); - var formStore = new dhis2.storage.Store( {name: 'anonymousForm', adapter: 'dom-ss'}, function ( store ) { - formStoreInitialized = true; - } ); - return { saveExecutionDate: function( programId, programStageInstanceId, executionDate, organisationUnitId ) { $.ajax( {