← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15939: Web api form resource, added subtitle

 

------------------------------------------------------------
revno: 15939
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-07-02 17:01:59 +0200
message:
  Web api form resource, added subtitle
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java


--
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-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java	2014-07-02 14:37:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java	2014-07-02 15:01:59 +0000
@@ -62,6 +62,7 @@
     {
         Form form = new Form();
         form.setLabel( dataSet.getDisplayName() );
+        form.setSubtitle( dataSet.getDisplayShortName() );
 
         form.getOptions().put( "periodType", dataSet.getPeriodType().getName() );
         form.getOptions().put( "allowFuturePeriods", dataSet.isAllowFuturePeriods() );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Form.java	2014-07-02 15:01:59 +0000
@@ -44,6 +44,8 @@
 {
     private String label;
 
+    private String subtitle;
+        
     private List<Group> groups = new ArrayList<Group>();
 
     private Map<String, Object> options = new HashMap<String, Object>();
@@ -64,6 +66,17 @@
     }
 
     @JsonProperty
+    public String getSubtitle()
+    {
+        return subtitle;
+    }
+    
+    public void setSubtitle( String subtitle )
+    {
+        this.subtitle = subtitle;
+    }
+    
+    @JsonProperty
     public List<Group> getGroups()
     {
         return groups;