dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33739
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17280: Approval. Added system setting for 'acceptance required for approval' under settings > approval.
------------------------------------------------------------
revno: 17280
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-10-25 14:07:45 +0200
message:
Approval. Added system setting for 'acceptance required for approval' under settings > approval.
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/SetApprovalSettingsAction.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/systemApprovalSettings.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 2014-10-09 12:31:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2014-10-25 12:07:45 +0000
@@ -102,6 +102,7 @@
final String KEY_LAST_SUCCESSFUL_ANALYTICS_TABLES_UPDATE = "keyLastSuccessfulAnalyticsTablesUpdate";
final String KEY_LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE = "keyLastSuccessfulResourceTablesUpdate";
final String KEY_HELP_PAGE_LINK = "helpPageLink";
+ final String KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL = "keyAcceptanceRequiredForApproval";
final String DEFAULT_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "lastMonth";
final String DEFAULT_FLAG = "dhis2";
=== 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 2014-10-19 17:45:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2014-10-25 12:07:45 +0000
@@ -126,6 +126,7 @@
map.put( KEY_DATABASE_SERVER_CPUS, systemSettingManager.getSystemSetting( KEY_DATABASE_SERVER_CPUS, DEFAULT_DATABASE_SERVER_CPUS ) );
map.put( KEY_HELP_PAGE_LINK, systemSettingManager.getSystemSetting( KEY_HELP_PAGE_LINK, DEFAULT_HELP_PAGE_LINK ) );
map.put( KEY_HIDE_UNAPPROVED_DATA_IN_ANALYTICS, systemSettingManager.getSystemSetting( KEY_HIDE_UNAPPROVED_DATA_IN_ANALYTICS, false ) );
+ map.put( KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL, systemSettingManager.getSystemSetting( KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL, false ) );
map.put( SYSPROP_PORTAL, defaultIfEmpty( System.getProperty( SYSPROP_PORTAL ), String.valueOf( false ) ) );
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/SetApprovalSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetApprovalSettingsAction.java 2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetApprovalSettingsAction.java 2014-10-25 12:07:45 +0000
@@ -54,6 +54,13 @@
{
this.hideUnapprovedDataInAnalytics = hideUnapprovedDataInAnalytics;
}
+
+ private Boolean acceptanceRequiredForApproval;
+
+ public void setAcceptanceRequiredForApproval( Boolean acceptanceRequiredForApproval )
+ {
+ this.acceptanceRequiredForApproval = acceptanceRequiredForApproval;
+ }
// -------------------------------------------------------------------------
// Output
@@ -81,6 +88,7 @@
public String execute()
{
systemSettingManager.saveSystemSetting( KEY_HIDE_UNAPPROVED_DATA_IN_ANALYTICS, hideUnapprovedDataInAnalytics );
+ systemSettingManager.saveSystemSetting( KEY_ACCEPTANCE_REQUIRED_FOR_APPROVAL, acceptanceRequiredForApproval );
message = i18n.getString( "settings_updated" );
=== 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 2014-09-28 18:52:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2014-10-25 12:07:45 +0000
@@ -121,4 +121,5 @@
no_of_database_server_cpus=Number of database server CPUs
automatic=Automatic
detect_based_on_web_server=detect based on web server
-help_page_link = Help page link
\ No newline at end of file
+help_page_link = Help page link
+acceptance_required_for_approval=Acceptance required for approval
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemApprovalSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemApprovalSettings.vm 2014-04-10 14:59:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemApprovalSettings.vm 2014-10-25 12:07:45 +0000
@@ -2,7 +2,8 @@
jQuery( document ).ready( function() {
jQuery( "input[type=button]" ).click( function() {
jQuery.postUTF8( "setSystemApprovalSettings.action", {
- hideUnapprovedDataInAnalytics: jQuery( "#hideUnapprovedDataInAnalytics" ).is( ':checked' )
+ hideUnapprovedDataInAnalytics: jQuery( "#hideUnapprovedDataInAnalytics" ).is( ":checked" ),
+ acceptanceRequiredForApproval: jQuery( "#acceptanceRequiredForApproval" ).is( ":checked" )
}, function( json ) {
if ( json.response == "success" ) {
setHeaderDelayMessage( json.message );
@@ -32,6 +33,11 @@
<label for="hideUnapprovedDataInAnalytics">$i18n.getString( "hide_unapproved_data_in_analytics" )</label>
</div>
+<div class="setting">
+ <input type="checkbox" id="acceptanceRequiredForApproval" name="acceptanceRequiredForApproval"#if( $keyAcceptanceRequiredForApproval ) checked="checked"#end>
+ <label for="acceptanceRequiredForApproval">$i18n.getString( "acceptance_required_for_approval" )</label>
+</div>
+
<div class="setting"><input type="button" value="$i18n.getString( 'save' )" style="width:10em"/></div>
<div id="contextMenu" class="contextMenu">