← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7952: J2ME Client Update Configuration

 

------------------------------------------------------------
revno: 7952
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-08-22 14:08:08 +0700
message:
  J2ME Client Update Configuration
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientMobileSetting.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/PatientMobileSettingService.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/resources/org/hisp/dhis/mobile/PatientMobileSetting.hbm.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ReceivingSMSAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/gateway.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smsServiceConfiguration.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/updateGateway.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/patient/PatientMobileSetting.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientMobileSetting.java	2012-05-29 15:37:40 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientMobileSetting.java	2012-08-22 07:08:08 +0000
@@ -31,16 +31,24 @@
 
 import org.hisp.dhis.common.BaseIdentifiableObject;
 
-public class PatientMobileSetting extends BaseIdentifiableObject
+public class PatientMobileSetting
+    extends BaseIdentifiableObject
 {
 
     private static final long serialVersionUID = -5947521380646718129L;
 
     private Boolean gender;
+
     private Boolean dobtype;
+
     private Boolean birthdate;
+
     private Boolean registrationdate;
-    
+
+    private Boolean autoUpdateClient;
+
+    private Double versionToUpdate;
+
     private List<PatientAttribute> patientAttributes;
 
     public PatientMobileSetting()
@@ -95,6 +103,28 @@
     public void setRegistrationdate( Boolean registrationdate )
     {
         this.registrationdate = registrationdate;
-    } 
-    
+    }
+
+    public Boolean getAutoUpdateClient()
+    {
+        return autoUpdateClient;
+    }
+
+    public void setAutoUpdateClient( Boolean autoUpdateClient )
+    {
+        this.autoUpdateClient = autoUpdateClient;
+    }
+
+    public double getVersionToUpdate()
+    {
+        if( versionToUpdate != null )
+            return versionToUpdate;
+        else
+            return 0;
+    }
+
+    public void setVersionToUpdate( Double versionToUpdate )
+    {
+        this.versionToUpdate = versionToUpdate;
+    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/PatientMobileSettingService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/PatientMobileSettingService.java	2011-11-04 11:27:33 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/PatientMobileSettingService.java	2012-08-22 07:08:08 +0000
@@ -38,4 +38,7 @@
     public void updatePatientMobileSetting( PatientMobileSetting setting );
 
     public Collection<PatientMobileSetting> getCurrentSetting();
+    
+    public PatientMobileSetting get( int id );
+    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java	2011-11-04 11:27:33 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java	2012-08-22 07:08:08 +0000
@@ -28,6 +28,7 @@
  */
 
 import java.util.Collection;
+import java.util.List;
 
 import org.hisp.dhis.api.mobile.PatientMobileSettingService;
 import org.hisp.dhis.api.mobile.PatientMobileSettingStore;
@@ -70,5 +71,10 @@
     {
         return patientMobileSettingStore.getCurrentSetting();
     }
-
+   
+    @Override
+    public PatientMobileSetting get( int id )
+    {
+        return patientMobileSettingStore.get( id );
+    }    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java	2011-11-04 11:27:33 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java	2012-08-22 07:08:08 +0000
@@ -28,6 +28,7 @@
  */
 
 import java.util.Collection;
+import java.util.List;
 
 import org.hibernate.Criteria;
 import org.hibernate.Session;

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/resources/org/hisp/dhis/mobile/PatientMobileSetting.hbm.xml'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/resources/org/hisp/dhis/mobile/PatientMobileSetting.hbm.xml	2012-05-29 15:37:40 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/resources/org/hisp/dhis/mobile/PatientMobileSetting.hbm.xml	2012-08-22 07:08:08 +0000
@@ -17,6 +17,10 @@
     <property name="birthdate" column="birthdate" not-null="true" />
 
     <property name="registrationdate" column="registrationdate" not-null="true" />
+    
+    <property name="autoUpdateClient" column="autoUpdateClient" not-null="false" />
+    
+    <property name="versionToUpdate" column="versionToUpdate" not-null="false" />
 
     <list name="patientAttributes">
       <key column="patientmobilesettingid" />

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2012-07-10 10:12:30 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2012-08-22 07:08:08 +0000
@@ -455,5 +455,11 @@
 		"serverPhoneNumber" : {
 			"digits" : true
 		}
+	},
+	"autoUpdateClient" : {
+		"version" : {
+			"required" : true,
+			"number" : true
+		}
 	}
 };

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ReceivingSMSAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ReceivingSMSAction.java	2012-08-10 02:43:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ReceivingSMSAction.java	2012-08-22 07:08:08 +0000
@@ -32,7 +32,6 @@
 
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.sms.SmsConfigurationManager;
-import org.hisp.dhis.sms.config.ModemGatewayConfig;
 import org.hisp.dhis.sms.config.SmsConfiguration;
 import org.hisp.dhis.sms.incoming.IncomingSms;
 import org.hisp.dhis.sms.incoming.IncomingSmsService;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml	2012-08-13 04:09:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml	2012-08-22 07:08:08 +0000
@@ -122,30 +122,39 @@
 		class="org.hisp.dhis.mobile.action.ReloadStartStopServiceAction"
 		scope="prototype" />
 
-	 <bean id="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction" class="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction"
-    scope="prototype">
-    <property name="smsCommandService" ref="smsCommandService" />
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
-
-  </bean>
-
-  <bean id="org.hisp.dhis.mobile.action.smscommand.EditSMSCommandForm" class="org.hisp.dhis.mobile.action.smscommand.EditSMSCommandForm"
-    scope="prototype">
-    <property name="smsCommandService" ref="smsCommandService" />
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
-    <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
-
-  </bean>
-
-  <bean id="org.hisp.dhis.mobile.action.smscommand.CreateSMSCommandForm" class="org.hisp.dhis.mobile.action.smscommand.CreateSMSCommandForm"
-    scope="prototype">
-    <property name="smsCommandService" ref="smsCommandService" />
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.mobile.action.smscommand.DeleteSMSCommandAction" class="org.hisp.dhis.mobile.action.smscommand.DeleteSMSCommandAction"
-    scope="prototype">
-    <property name="smsCommandService" ref="smsCommandService" />
-  </bean>
+	<bean id="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction"
+		class="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction" scope="prototype">
+		<property name="smsCommandService" ref="smsCommandService" />
+		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+
+	</bean>
+
+	<bean id="org.hisp.dhis.mobile.action.smscommand.EditSMSCommandForm"
+		class="org.hisp.dhis.mobile.action.smscommand.EditSMSCommandForm"
+		scope="prototype">
+		<property name="smsCommandService" ref="smsCommandService" />
+		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+		<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+
+	</bean>
+
+	<bean id="org.hisp.dhis.mobile.action.smscommand.CreateSMSCommandForm"
+		class="org.hisp.dhis.mobile.action.smscommand.CreateSMSCommandForm"
+		scope="prototype">
+		<property name="smsCommandService" ref="smsCommandService" />
+		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+	</bean>
+
+	<bean id="org.hisp.dhis.mobile.action.smscommand.DeleteSMSCommandAction"
+		class="org.hisp.dhis.mobile.action.smscommand.DeleteSMSCommandAction"
+		scope="prototype">
+		<property name="smsCommandService" ref="smsCommandService" />
+	</bean>
+
+	<bean id="org.hisp.dhis.mobile.action.J2meClientUpdateAction"
+		class="org.hisp.dhis.mobile.action.J2meClientUpdateAction" scope="prototype">
+		<property name="patientMobileSettingService"
+			ref="org.hisp.dhis.mobile.service.PatientMobileSettingService" />
+	</bean>
 
 </beans>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties	2012-08-16 13:46:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties	2012-08-22 07:08:08 +0000
@@ -1,135 +1,139 @@
-intro_patient_mobile_setting=Define what person information will be sent to the mobile device.
-patient_mobile_setting=Person Mobile Settings
-gender=Gender
-dob_type=DoB Type
-date_of_birth=Date of Birth
-blood_group=Blood Group
-registration_date=Registration Date
-available_patient_attributes=Available Patient Attributes
-filter=Filter
-selected_patient_attributes=Selected Patient Attributes
-intro_mobile_dataset=Define and sort the data sets which are available for facility reporting on the mobile client.
-mobile_dataset=Dataset for Mobile
-available_datasets=Available DataSets
-mobile_configuration=Mobile Configuration
-sms_service_configuration=SMS Service Configuration
-service_status=Service Status
-status=Status
-no.=No.
-delete=Delete
-check_all=Click Here To Check All
-error_delete=Please check before delete
-required_data_error=Please fill in required fields (*)
-new_message=You have new messages, press F5 to view them
-sms_service_is_runnning=SMS Service is running
-sms_service_is_stopped=SMS Service is stopped
-reload_configuration=Reload Configuration
-stop_sms_service=Stop SMS Service
-configuration=Configuration
-polling_interval_in_seconds=Polling interval in seconds
-server_phone_number=Server Phone Number
-gateways=Gateways
-operation=Operation
-gateway_type=Gateway Type
-send_sms=Send SMS
-send_sms_beneficiary=Send SMS to Person
-list_sent_SMS=List Of Sent SMS
-add_gateway=Add Gateway
-gateway_type=Gateway Type
-type=Type
-gateway_configuration=Gateway Configuration
-gateway_name=Gateway Name
-username=Username
-password=Password
-port=Port
-baudrate=BaudRate
-manufacturer=Manufacturer
-model=Model
-pin=PIN
-inbound=Inbound
-outbound=Outbound
-api_id=API ID
-outboundsms_saved=The gateway details have been saved, but no message was sent.
-save_settings=Save Settings
-add_gw=Add gateway
-start_sms_service=Start SMS Service
-stop_sms_service=Stop SMS Service
-show_send_sms_form=Send SMS
-bulk_gw=BulkSMS Gateway
-clickatell_gw=Clickatell Gateway
-generic_http_gw=Generic HTTP Gateway
-url_template=URL Template
-modem_gw=Modem Gateway
-add_update_gateway_success=The gateway was added/updated successfully.
-add_update_gateway_management=Gateway Configuration Management
-confirm_delete_gateway=Do you want to delete this gateway configuration?
-confirm_delete_sms=Do you want to delete this SMS?
-confirm_delete_items=Do you want to delete those items?
-smsconfiguration_not_available=SMS Configuration is not available
-outboundsmsservice_is_null_or_unable=SMS Service is not available or unable to be started.
-service_started=SMS Service is started
-service_starting=SMS Service is starting
-service_stopped=SMS Service is stopped
-service_stopping=SMS Service is stopping
-message_not_sent=Message not sent
-message=Message
-send_sms_to_target=Send SMS to
-list_sent_SMS =List Of Sent SMS
-show_receive_sms_form =Receive SMS
-update_success=Update Successfully
-config_my_gateway =Configure My Gateway
-delete_checked_option =Delete Checked Options
-import =Import
-phone_number=Phone number
-raw_phone_number=Raw phone numbers
-assigned_user_number=User assigned to organisation unit 
-stakeholder_number=Stakeholder number (Contact person)
-patient_number=Person/Patient number
-programs=Programs
-organisation_unit_level=Organisation unit level
-chidren_only=Children only
-please_select_a_program=Please select a program
-there_is_no_program=There is no program selected, won't send SMS to any Person
-please_select_a_gateway_type_to_send_sms=Please specify a gateway to send the SMS
-service_stopped_cannot_send_sms=Service is stopped. SMS cannot be sent.
-please_verify_phone=Please verify the phone number(s). Separate each number with a semicolon (;)
-please_select_orgunit=Please select at least one organisation unit
-no_recipient=There is no recipient. SMS cannot be sent.\nNotes: Make sure that "Message sms notification" Setting is activated.
-unable_load_gateway=Unable to load gateway
-unable_start_smslib_service=Unable to start smsLib service
-unable_stop_smslib_service=Unable to stop smsLib service
-sms_unable_or_there_is_no_gateway_service_not_started=SMS Service is not enabled or no gateway has been specified.\nSMS Service will not be started.
-unable_load_configuration_cause_of_there_is_no_gateway=Unable to load the configuration because there is no gateway.
-registering_unit=Registering Unit
-search_by_name_identifier=Search by name or identifier
-search_by_program=Search by program
-please_select_village=Please select village
-specify_search_criteria=Please specify search criteria
-list_all_patients=List all beneficiaries
-search=Search
-search_by_selected_unit=Search by selected unit
-please_select_village=Please select village
-please_select=Please Select
-activity_grouping_attribute=Activity Grouping Attribute
-sms_configuration_not_initialized=SMS Service is not initialized.\nPlease fill in two fields as below then click "Save Settings".
-search_details=Search details
-male=Male
-female=Female
-age=Age
-full_name=Full name
-no_phone=No phone
-add_phone_to_list=Add phone to list
-hierachy_orgunit=Hierarchy organisation unit
-total_result=Total number of results
-search_result_matching_the_search_criteria=Result matches the search criteria
-search_patients_by_attributes=Search persons by attributes
-sms_command_form=SMS Commands
-add_command=Add command
-command_details=Command Details
-region=Region
-international=International
-uk=United Kingdom
-south_africa=South Africa
-spain=Spain
-usa=USA
-germany=Germany
\ No newline at end of file
+intro_patient_mobile_setting=Define what person information will be sent to the mobile device.
+patient_mobile_setting=Person Mobile Settings
+gender=Gender
+dob_type=DoB Type
+date_of_birth=Date of Birth
+blood_group=Blood Group
+registration_date=Registration Date
+available_patient_attributes=Available Patient Attributes
+filter=Filter
+selected_patient_attributes=Selected Patient Attributes
+intro_mobile_dataset=Define and sort the data sets which are available for facility reporting on the mobile client.
+mobile_dataset=Dataset for Mobile
+available_datasets=Available DataSets
+mobile_configuration=Mobile Configuration
+sms_service_configuration=SMS Service Configuration
+service_status=Service Status
+status=Status
+no.=No.
+delete=Delete
+check_all=Click Here To Check All
+error_delete=Please check before delete
+required_data_error=Please fill in required fields (*)
+new_message=You have new messages, press F5 to view them
+sms_service_is_runnning=SMS Service is running
+sms_service_is_stopped=SMS Service is stopped
+reload_configuration=Reload Configuration
+stop_sms_service=Stop SMS Service
+configuration=Configuration
+polling_interval_in_seconds=Polling interval in seconds
+server_phone_number=Server Phone Number
+gateways=Gateways
+operation=Operation
+gateway_type=Gateway Type
+send_sms=Send SMS
+send_sms_beneficiary=Send SMS to Person
+list_sent_SMS=List Of Sent SMS
+add_gateway=Add Gateway
+gateway_type=Gateway Type
+type=Type
+gateway_configuration=Gateway Configuration
+gateway_name=Gateway Name
+username=Username
+password=Password
+port=Port
+baudrate=BaudRate
+manufacturer=Manufacturer
+model=Model
+pin=PIN
+inbound=Inbound
+outbound=Outbound
+api_id=API ID
+outboundsms_saved=The gateway details have been saved, but no message was sent.
+save_settings=Save Settings
+add_gw=Add gateway
+start_sms_service=Start SMS Service
+stop_sms_service=Stop SMS Service
+show_send_sms_form=Send SMS
+bulk_gw=BulkSMS Gateway
+clickatell_gw=Clickatell Gateway
+generic_http_gw=Generic HTTP Gateway
+url_template=URL Template
+modem_gw=Modem Gateway
+add_update_gateway_success=The gateway was added/updated successfully.
+add_update_gateway_management=Gateway Configuration Management
+confirm_delete_gateway=Do you want to delete this gateway configuration?
+confirm_delete_sms=Do you want to delete this SMS?
+confirm_delete_items=Do you want to delete those items?
+smsconfiguration_not_available=SMS Configuration is not available
+outboundsmsservice_is_null_or_unable=SMS Service is not available or unable to be started.
+service_started=SMS Service is started
+service_starting=SMS Service is starting
+service_stopped=SMS Service is stopped
+service_stopping=SMS Service is stopping
+message_not_sent=Message not sent
+message=Message
+send_sms_to_target=Send SMS to
+list_sent_SMS =List Of Sent SMS
+show_receive_sms_form =Receive SMS
+update_success=Update Successfully
+config_my_gateway =Configure My Gateway
+delete_checked_option =Delete Checked Options
+import =Import
+phone_number=Phone number
+raw_phone_number=Raw phone numbers
+assigned_user_number=User assigned to organisation unit 
+stakeholder_number=Stakeholder number (Contact person)
+patient_number=Person/Patient number
+programs=Programs
+organisation_unit_level=Organisation unit level
+chidren_only=Children only
+please_select_a_program=Please select a program
+there_is_no_program=There is no program selected, won't send SMS to any Person
+please_select_a_gateway_type_to_send_sms=Please specify a gateway to send the SMS
+service_stopped_cannot_send_sms=Service is stopped. SMS cannot be sent.
+please_verify_phone=Please verify the phone number(s). Separate each number with a semicolon (;)
+please_select_orgunit=Please select at least one organisation unit
+no_recipient=There is no recipient. SMS cannot be sent.\nNotes: Make sure that "Message sms notification" Setting is activated.
+unable_load_gateway=Unable to load gateway
+unable_start_smslib_service=Unable to start smsLib service
+unable_stop_smslib_service=Unable to stop smsLib service
+sms_unable_or_there_is_no_gateway_service_not_started=SMS Service is not enabled or no gateway has been specified.\nSMS Service will not be started.
+unable_load_configuration_cause_of_there_is_no_gateway=Unable to load the configuration because there is no gateway.
+registering_unit=Registering Unit
+search_by_name_identifier=Search by name or identifier
+search_by_program=Search by program
+please_select_village=Please select village
+specify_search_criteria=Please specify search criteria
+list_all_patients=List all beneficiaries
+search=Search
+search_by_selected_unit=Search by selected unit
+please_select_village=Please select village
+please_select=Please Select
+activity_grouping_attribute=Activity Grouping Attribute
+sms_configuration_not_initialized=SMS Service is not initialized.\nPlease fill in two fields as below then click "Save Settings".
+search_details=Search details
+male=Male
+female=Female
+age=Age
+full_name=Full name
+no_phone=No phone
+add_phone_to_list=Add phone to list
+hierachy_orgunit=Hierarchy organisation unit
+total_result=Total number of results
+search_result_matching_the_search_criteria=Result matches the search criteria
+search_patients_by_attributes=Search persons by attributes
+sms_command_form=SMS Commands
+add_command=Add command
+command_details=Command Details
+region=Region
+international=International
+uk=United Kingdom
+south_africa=South Africa
+spain=Spain
+usa=USA
+germany=Germany
+j2me_client_update=J2ME Client Update
+j2me_client_update_config=J2ME Client Update Configuration
+auto_update_client=Automatic update for J2ME clients
+client_older_than=Update to clients older than version

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml	2012-08-14 09:50:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml	2012-08-22 07:08:08 +0000
@@ -166,24 +166,24 @@
     <!-- SMSCommmand start -->
      <action name="SMSCommands" class="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction">
       <result name="success" type="velocity">/main.vm</result>
-       <param name="page">/dhis-web-maintenance-mobile/smscommand/sms-commands.vm</param>
-        <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
+      <param name="page">/dhis-web-maintenance-mobile/smscommand/sms-commands.vm</param>
+      <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
       <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/sendSMS.js</param>
       <param name="requiredAuthorities">F_MOBILE_SENDSMS</param>  
     </action>
     
     <action name="newSMSCommand" class="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction">
       <result name="success" type="velocity">/main.vm</result>
-       <param name="page">/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm</param>
-        <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
+      <param name="page">/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm</param>
+      <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
       <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/sendSMS.js</param>
       <param name="requiredAuthorities">F_MOBILE_SENDSMS</param>  
     </action>
     
     <action name="editSMSCommand" class="org.hisp.dhis.mobile.action.smscommand.SMSCommandAction">
       <result name="success" type="velocity">/main.vm</result>
-       <param name="page">/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm</param>
-        <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
+      <param name="page">/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm</param>
+      <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
       <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/sendSMS.js</param>
       <param name="requiredAuthorities">F_MOBILE_SENDSMS</param>  
     </action>
@@ -200,12 +200,21 @@
           <result name="success" type="redirect">SMSCommands.action</result>
     </action>
     
-    <!--  SMSCommand end -->
-     <action name="sendSMS" class="org.hisp.dhis.mobile.action.ProcessingSendSMSAction">
+    <!-- SMSCommand end -->
+    <action name="sendSMS" class="org.hisp.dhis.mobile.action.ProcessingSendSMSAction">
       <result name="success" type="velocity-json">../dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
       <result name="error" type="velocity-json">../dhis-web-commons/ajax/jsonResponseError.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
     </action>
+    
+    <!-- J2ME Client Update -->
+    
+    <action name="showJ2meClientUpdatePage" class="org.hisp.dhis.mobile.action.J2meClientUpdateAction">
+    	<result name="success" type="velocity">/main.vm</result>
+    	<param name="page">/dhis-web-maintenance-mobile/j2meClientUpdatePage.vm</param>
+    	<param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
+    	<param name="javascripts">javascript/gateway.js</param>
+    </action>
 	
   </package>
 </struts>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/gateway.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/gateway.js	2012-08-14 09:50:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/gateway.js	2012-08-22 07:08:08 +0000
@@ -63,6 +63,17 @@
 	return rules;
 }
 
+function getValidationRulesUpdateClient()
+{
+	var rules = { 
+		"version" : { 
+			"required" : true,
+			"digits" : true
+		}
+	};
+	return rules;
+}
+
 function saveGatewayConfig()
 {
 	
@@ -155,12 +166,13 @@
 	}
 }
 
-function deleteItem( itemId, itemName, confirmation, action, success )
+function removeItem( itemId, itemName, confirmation, action, success )
 {                
     var result = window.confirm( confirmation + "\n\n" + itemName );
     
     if ( result )
     {
+		lockScreen();
 		refreshIndex( itemId );
     	$.postJSON(
     	    action,
@@ -182,11 +194,12 @@
 					{
 						success.call();
 					}
-  
+					unLockScreen();
 					showSuccessMessage( i18n_delete_success );
     	    	}
     	    	else if ( json.response == "error" )
     	    	{ 
+					unLockScreen();
 					showWarningMessage( json.message );
     	    	}
     	    }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm	2012-06-27 07:25:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm	2012-08-22 07:08:08 +0000
@@ -7,5 +7,6 @@
     <li><a href="showSMSForm.action">$i18n.getString( "show_send_sms_form" )</a></li>
 	<li><a href="showReceivingPage.action">$i18n.getString( "show_receive_sms_form" )</a></li>
 	<li><a href="SMSCommands.action">$i18n.getString( "sms_command_form" )</a></li>
+	<li><a href="showJ2meClientUpdatePage.action">$i18n.getString( "j2me_client_update" )</a></li>
 	
 </ul>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm	2012-08-13 02:55:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm	2012-08-22 07:08:08 +0000
@@ -145,36 +145,44 @@
 <input id="pollingInterval" name="pollingInterval" type="hidden" value="$pollingInterval"/>
 <h3>$i18n.getString( "show_receive_sms_form" )</h3>
 <form id="receiveSmsPage" name="receiveSmsPage" action="showReceivingPage.action" method="post" >
+	<div style="text-align:right; width:800px">
+		<input type="button" name="btnDelete" value="$i18n.getString( 'delete_checked_option' )" onclick="deleteChecked()"/>	
+	</div>
 	<br/>
 	<table id="detailsSmsList" class="listTable" style="width:800px">
 		<col width="40px"/>
+		<col width="60px"/>
 		<col width="400px"/>
 		<col width="150px"/>
 		<col width="60px"/>
 		<thead>
+			<th style="text-align:center"><a href="#" onclick="checkAll()" title="$i18n.getString( 'check_all' )"><img src="../images/check.png"/></a></th>
 			<th style="text-align:center">$i18n.getString( "no." )</th>
 			<th>$i18n.getString( "message" )</th>
 			<th>$i18n.getString( "phone_number" )</th>
 			<th>$i18n.getString( "status" )</th>
 			<th style="text-align:center">$i18n.getString( "delete" )</th>
-			<th style="text-align:center"><a href="#" onclick="checkAll()" title="$i18n.getString( 'check_all' )"><img src="../images/check.png"/></a></th>
+			
 		</thead>
-		
-		#foreach( $incomingSms in $listIncomingSms )
-		<tr id="tr${incomingSms.id}">
-			<td style="text-align:center">$velocityCount</td>
-			<td>
-				<a id="$velocityCount" style="display: block" href="#" onclick="makeVisible( $incomingSms.id, $velocityCount )">$incomingSms.text</a>
-				<input type="hidden" id="$incomingSms.id" value="$incomingSms.text" onblur="makeVisible( $incomingSms.id, $velocityCount )"/></td>
-			<td>$incomingSms.originator</td>
-			<td>update</td>
-			<td style="text-align:center"><a href="javascript:removeSingleItem( '$incomingSms.id', '$incomingSms.getText()' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></td>
-			<td style="text-align:center"><input type="checkbox" name="mycheck" value="$incomingSms.id"/></td>			
-		</tr>
-		#end
+		<tbody>
+			#foreach( $incomingSms in $listIncomingSms )
+			<tr id="tr${incomingSms.id}">
+				<td style="text-align:center"><input type="checkbox" name="mycheck" value="$incomingSms.id"/></td>			
+				<td style="text-align:center">$velocityCount</td>
+				<td>
+					<a id="$velocityCount" style="display: block" href="#" onclick="makeVisible( $incomingSms.id, $velocityCount )">$incomingSms.text</a>
+					<input type="hidden" id="$incomingSms.id" value="$incomingSms.text" onblur="makeVisible( $incomingSms.id, $velocityCount )"/></td>
+				<td>$incomingSms.originator</td>
+				<td>update</td>
+				<td style="text-align:center"><a href="javascript:removeSingleItem( '$incomingSms.id', '$incomingSms.getText()' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></td>
+				
+			</tr>
+			#end
+		</tbody>
 	</table>
 	<br/>
-	<input type="button" name="btnShowConfig" value="$i18n.getString( 'config_my_gateway' )" onclick="window.location='showSMSConfigureForm.action'"/>
-	<input type="button" name="btnDelete" value="$i18n.getString( 'delete_checked_option' )" onclick="deleteChecked()"/>	
-	
+	<div style="text-align:right; width:800px">
+		<input type="button" name="btnShowConfig" value="$i18n.getString( 'config_my_gateway' )" onclick="window.location='showSMSConfigureForm.action'"/>
+	</div>
+
 </form>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smsServiceConfiguration.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smsServiceConfiguration.vm	2012-08-14 09:50:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smsServiceConfiguration.vm	2012-08-22 07:08:08 +0000
@@ -58,8 +58,13 @@
 				document.getElementById(indexDeleted + 1).href = 'showUpdateGateWayConfigForm.action?index='+indexDeleted;
 			}			
 		}
-		//var theLink = document.getElementById("1").getAttribute("href");
+		jQuery( '#gatewaySize' ).val(gwSize - 1);
 		
+		if ( gwSize == 4 )
+		{
+			document.getElementById( 'btnAddGw' ).disabled = false;
+		}
+		//document.getElementById("1").getAttribute("href");		
 	};
 
 	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_gateway" ) , "'")';
@@ -74,6 +79,7 @@
 <h3>$i18n.getString( "sms_service_configuration" )</h3>
 <input id="isSettingAvailable" name="isSettingAvailable" type="hidden" #if ( $!smsConfig ) value="true" #else value="false" #end/>
 <input id="gatewaySize" name="gatewaySize" type="hidden" value="$gatewayConfigMap.keySet().size()"/>
+#set( $gwSizeTemp = $gatewayConfigMap.keySet().size() )
 <form id="saveSmsConfigurationForm" name="saveSmsConfigurationForm" action="saveSmsConfiguration.action" method="post" >
   <table id="detailsList" border="0">
     <col/> ## Labels
@@ -110,7 +116,8 @@
       <tr>
         <th colspan="2">$i18n.getString("configuration")</th>
       </tr>
-
+	</thead>
+	
 	<tbody>
 		<tr>
 			<td><label for="pollingInterval">$i18n.getString( "polling_interval_in_seconds" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
@@ -153,7 +160,7 @@
 		</tr>
 		<tr>
 			<td align="right" colspan="2">
-				<input type="button" id="btnAddGw" value="$i18n.getString( 'add_gw' )" style="width:13em" onclick="window.location.href='showUpdateGateWayConfigForm.action'"/>
+				<input type="button" id="btnAddGw" value="$i18n.getString( 'add_gw' )" style="width:13em" #if( $!gwSizeTemp == 4 ) disabled="true" #end onclick="window.location.href='showUpdateGateWayConfigForm.action'"/>
 			</td>
 		</tr>	
 	</tbody>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/updateGateway.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/updateGateway.vm	2012-08-14 09:50:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/updateGateway.vm	2012-08-22 07:08:08 +0000
@@ -40,11 +40,11 @@
 				<td><input type="text" name="name" id="name" style="width: 28em" value="$!encoder.htmlEncode( $!bulkGateway.name )"/></td>
 			</tr>
 			<tr>
-				<td>$i18n.getString( "username" ) <em title="Required" class="required">*</em>:</td>
+				<td>$i18n.getString( "username" ) <em title="$i18n.getString( 'required' )" class="required">*</em>:</td>
 				<td><input type="text" name="username" id="username" style="width: 28em" value="$!bulkGateway.username"/></td>
 			</tr> 
 			<tr>
-				<td>$i18n.getString( "password" ) <em title="Required" class="required">*</em>:</td>
+				<td>$i18n.getString( "password" ) <em title="$i18n.getString( 'required' )" class="required">*</em>:</td>
 				<td><input type="text" name="password" id="password" style="width: 28em" value="$!bulkGateway.password"/></td>
 			</tr>
 			<tr>
@@ -68,11 +68,11 @@
 				<td><input type="text" name="name" id="name" style="width: 28em" value="$!encoder.htmlEncode( $!modemGateway.name )"/></td>
 			</tr>
 			<tr>
-				<td>$i18n.getString( "port" ) <em title="Required" class="required">*</em>:</td>
+				<td>$i18n.getString( "port" ) <em title="$i18n.getString( 'required' )" class="required">*</em>:</td>
 				<td><input type="text" name="port" id="port" style="width: 28em" value="$!modemGateway.port"/></td>
 			</tr>
 			<tr>
-				<td>$i18n.getString( "baudrate" ) <em title="Required" class="required">*</em>:</td>
+				<td>$i18n.getString( "baudrate" ) <em title="$i18n.getString( 'required' )" class="required">*</em>:</td>
 				<td><input type="text" name="baudRate" id="baudRate" style="width: 28em" value="$!modemGateway.baudRate"/></td>
 			</tr>
 			<tr>