← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22068: minor fix, correctly display program/programStages in event export

 

------------------------------------------------------------
revno: 22068
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-02-29 08:57:48 +0700
message:
  minor fix, correctly display program/programStages in event export
modified:
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm


--
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-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm	2015-08-03 22:22:21 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm	2016-02-29 01:57:48 +0000
@@ -52,12 +52,12 @@
     selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
 
     $.ajax({
-       url: '../api/programs.json'
+       url: '../api/programs.json?fields=id,displayName'
     } ).done(function(data) {
         var options = [];
 
         $.each(data.programs, function() {
-            var option = $( '<option/>' ).html( this.name ).val(this.id);
+            var option = $( '<option/>' ).html( this.displayName ).val(this.id);
             options.push( option );
         });
 
@@ -77,12 +77,12 @@
                 .html($( '<option/>' ).html('$i18n.getString( "no_program_stages_available" )'));
 
         $.ajax({
-           url: '../api/programs/' + program + '.json'
+           url: '../api/programs/' + program + '.json?fields=id,displayName,programStages[id,displayName]'
         } ).done(function(data) {
             var options = [];
 
             $.each(data.programStages, function() {
-                var option = $( '<option/>' ).html( this.name ).val(this.id);
+                var option = $( '<option/>' ).html( this.displayName ).val(this.id);
                 options.push( option );
             });