dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18876
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8023: Automatic SMS reminder (WIP) - Add a param for setting time to send message.
------------------------------------------------------------
revno: 8023
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-09-10 10:17:24 +0700
message:
Automatic SMS reminder (WIP) - Add a param for setting time to send message.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-06-27 16:54:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-09-10 03:17:24 +0000
@@ -69,6 +69,7 @@
final String KEY_ORGUNITGROUPSET_AGG_LEVEL = "orgUnitGroupSetAggregationLevel";
final String KEY_SMS_CONFIG = "SMS_CONFIG";
final String KEY_CACHE_STRATEGY = "keyCacheStrategy";
+ final String KEY_TIME_FOR_SENDING_MESSAGE = "timeSendingMessage";
final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20;
final int DEFAULT_TIMEFRAME_MINUTES = 1;
@@ -78,6 +79,7 @@
final String DEFAULT_START_MODULE = "dhis-web-dashboard-integration";
final int DEFAULT_COMPLETENESS_OFFSET = 15;
+ final String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00";
final HashSet<String> DEFAULT_SCHEDULED_PERIOD_TYPES = new HashSet<String>() { {
add( MonthlyPeriodType.NAME );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2012-04-27 17:03:51 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2012-09-10 03:17:24 +0000
@@ -82,6 +82,7 @@
map.put( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, systemSettingManager.getSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, false ) );
map.put( KEY_FACTOR_OF_DEVIATION, systemSettingManager.getSystemSetting( KEY_FACTOR_OF_DEVIATION, DEFAULT_FACTOR_OF_DEVIATION ) );
map.put( KEY_COMPLETENESS_OFFSET, systemSettingManager.getSystemSetting( KEY_COMPLETENESS_OFFSET, DEFAULT_COMPLETENESS_OFFSET ) );
+ map.put( KEY_TIME_FOR_SENDING_MESSAGE, systemSettingManager.getSystemSetting( KEY_TIME_FOR_SENDING_MESSAGE, DEFAULT_TIME_FOR_SENDING_MESSAGE ) );
invocation.getStack().push( map );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java 2012-06-28 09:21:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetGeneralSettingsAction.java 2012-09-10 03:17:24 +0000
@@ -167,6 +167,13 @@
this.completenessOffset = completenessOffset;
}
+ private String timeSendingMessage;
+
+ public void setTimeSendingMessage( String timeSendingMessage )
+ {
+ this.timeSendingMessage = timeSendingMessage;
+ }
+
private String message;
public String getMessage()
@@ -192,6 +199,7 @@
systemSettingManager.saveSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, disableDataEntryWhenCompleted );
systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );
systemSettingManager.saveSystemSetting( KEY_COMPLETENESS_OFFSET, completenessOffset );
+ systemSettingManager.saveSystemSetting( KEY_TIME_FOR_SENDING_MESSAGE, timeSendingMessage );
Configuration configuration = configurationService.getConfiguration();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2012-06-28 09:21:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2012-09-10 03:17:24 +0000
@@ -104,3 +104,4 @@
cache_until_6am_tomorrow=Cache until 6 AM tomorrow
cache_for_two_weeks=Cache for two weeks
max_levels_to_offline=Maximum Organisation Unit Levels to Offline
+time_for_sending_message = Time for sending message
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm 2012-06-28 09:21:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemGeneralSettings.vm 2012-09-10 03:17:24 +0000
@@ -11,7 +11,8 @@
omitIndicatorsZeroNumeratorDataMart: jQuery( '#omitIndicatorsZeroNumeratorDataMart' ).is( ':checked' ),
disableDataEntryWhenCompleted: jQuery( '#disableDataEntryWhenCompleted' ).is( ':checked' ),
factorDeviation: getFieldValue( 'factorDeviation' ),
- completenessOffset: getFieldValue( 'completenessOffset' )
+ completenessOffset: getFieldValue( 'completenessOffset' ),
+ timeSendingMessage: getFieldValue( 'timeSendingMessage' )
}, function( json ) {
if ( json.response == "success" )
setHeaderDelayMessage( json.message );
@@ -121,4 +122,11 @@
<input type="text" id="completenessOffset" name="completenessOffset" value="$!completenessOffset"/>
</p>
+
+<!-- days_after_period_timeliness -->
+<h4>$i18n.getString( "time_for_sending_message" )</h4>
+
+<p>
+ <input type="text" id="timeSendingMessage" name="timeSendingMessage" value="$!timeSendingMessage"/>
+</p>
<p><input type="button" value="$i18n.getString( 'save' )" style="width:10em"/></p>
\ No newline at end of file