← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11733: removed properties allowFuturePeriods, and periodType from forms. They can now be found under the...

 

------------------------------------------------------------
revno: 11733
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-08-21 14:10:58 +0200
message:
  removed properties allowFuturePeriods, and periodType from forms. They can now be found under the options map.
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/FormUtils.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/form/Form.java
  dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.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-api/src/main/java/org/hisp/dhis/api/utils/FormUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/FormUtils.java	2013-08-21 10:40:39 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/FormUtils.java	2013-08-21 12:10:58 +0000
@@ -63,9 +63,6 @@
         form.getOptions().put( "periodType", dataSet.getPeriodType().getName() );
         form.getOptions().put( "allowFuturePeriods", dataSet.isAllowFuturePeriods() );
 
-        form.setPeriodType( dataSet.getPeriodType().getName() );
-        form.setAllowFuturePeriods( dataSet.isAllowFuturePeriods() );
-
         if ( dataSet.getSections().size() > 0 )
         {
             for ( Section section : dataSet.getSections() )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/form/Form.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/form/Form.java	2013-08-20 13:23:29 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/form/Form.java	2013-08-21 12:10:58 +0000
@@ -69,17 +69,6 @@
     }
 
     @JsonProperty
-    public String getPeriodType()
-    {
-        return periodType;
-    }
-
-    public void setPeriodType( String periodType )
-    {
-        this.periodType = periodType;
-    }
-
-    @JsonProperty
     public List<Group> getGroups()
     {
         return groups;
@@ -91,17 +80,6 @@
     }
 
     @JsonProperty
-    public Boolean isAllowFuturePeriods()
-    {
-        return allowFuturePeriods;
-    }
-
-    public void setAllowFuturePeriods( Boolean allowFuturePeriods )
-    {
-        this.allowFuturePeriods = allowFuturePeriods;
-    }
-
-    @JsonProperty
     public Map<String, Object> getOptions()
     {
         return options;

=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm	2013-07-01 10:38:59 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm	2013-08-21 12:10:58 +0000
@@ -125,8 +125,8 @@
         $.mobile.loading( 'show' );
 
         var form = fm.form( Selected.dataSet );
-        periodType = form.periodType;
-        allowFuturePeriods = form.allowFuturePeriods;
+        periodType = form.options.periodType;
+        allowFuturePeriods = form.options.allowFuturePeriods;
         refreshPeriods();
 
         $.mobile.loading( 'hide' );