← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12785: minor fix in anonymous entry, if psi is undefined, try and get it from the programstage selector

 

------------------------------------------------------------
revno: 12785
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-21 22:30:59 +0200
message:
  minor fix in anonymous entry, if psi is undefined, try and get it from the programstage selector
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-10-16 10:03:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-10-21 20:30:59 +0000
@@ -1143,6 +1143,10 @@
 function loadProgramStage( programStageId, programStageInstanceId, organisationUnitId, success, fail ) {
     var data = createProgramStage( programStageId, programStageInstanceId, organisationUnitId );
 
+    if( programStageId === undefined ) {
+        programStageId = $('#programId option:selected').attr('psid');
+    }
+
     DAO.store.get('programStages', programStageId ).done(function(obj) {
         if(success) success(obj.form);
     } ).fail(function() {