← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3880: Minor fixes

 

------------------------------------------------------------
revno: 3880
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-06-12 11:54:51 +0200
message:
  Minor fixes
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
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-api/src/main/java/org/hisp/dhis/configuration/Configuration.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java	2011-06-09 14:43:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java	2011-06-12 09:54:51 +0000
@@ -31,6 +31,7 @@
 
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.period.PeriodType;
+import org.hisp.dhis.period.YearlyPeriodType;
 import org.hisp.dhis.user.UserGroup;
 
 /**
@@ -44,6 +45,8 @@
      */
     private static final long serialVersionUID = 936186436040704261L;
     
+    private static final PeriodType DEFAULT_INFRASTRUCTURAL_PERIODTYPE = new YearlyPeriodType();
+    
     private int id;
     
     private UserGroup feedbackRecipients;
@@ -55,7 +58,20 @@
     public Configuration()
     {
     }
+
+    // -------------------------------------------------------------------------
+    // Logic
+    // -------------------------------------------------------------------------
+
+    public PeriodType getInfrastructuralPeriodTypeDefaultIfNull()
+    {
+        return infrastructuralPeriodType != null ? infrastructuralPeriodType : DEFAULT_INFRASTRUCTURAL_PERIODTYPE;
+    }
     
+    // -------------------------------------------------------------------------
+    // Set and get methods
+    // -------------------------------------------------------------------------
+
     public int getId()
     {
         return id;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2011-06-10 11:47:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2011-06-12 09:54:51 +0000
@@ -3,10 +3,14 @@
 
 <form id="systemSettingForm" method="post" action="setSystemSettings.action">
 
+<!-- TODO temporarily disabled
+
 <h4>$i18n.getString( "system_identifier" ) ($i18n.getString( "can_be_set_once" ))</h4>
 
 <p><input type="text" name="systemIdentifier" style="width:30em" maxlength="40" value="$!keySystemIdentifier"#if( $keySystemIdentifier ) disabled="disabled"#end/></p>
 
+-->
+
 <h4>$i18n.getString( "application_title" )</h4>
 
 <p><input type="text" name="applicationTitle" style="width:30em" maxlength="40" value="$!applicationTitle"/></p>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2011-06-11 20:37:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2011-06-12 09:54:51 +0000
@@ -125,6 +125,7 @@
 F_PROGRAM_ADD = Add Program
 F_PROGRAM_UPDATE = Update Program
 F_PROGRAM_DELETE = Delete Program
+F_PROGRAM_VALIDATION = Manage Program Validation
 F_PROGRAMSTAGE_ADD = Add Program Stage
 F_PROGRAMSTAGE_UPDATE = Update Program Stage
 F_PROGRAMSTAGE_DELETE = Delete Program Stage