dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24350
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11921: change the name on UI of service sms and remove send sms to person.
------------------------------------------------------------
revno: 11921
committer: Long <Long@Long-Laptop>
branch nick: dhis2
timestamp: Wed 2013-09-04 21:04:01 +0700
message:
change the name on UI of service sms and remove send sms to person.
modified:
dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java
dhis-2/dhis-web/dhis-web-sms/src/main/resources/org/hisp/dhis/sms/i18n_module.properties
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendSMSPage.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-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java'
--- dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java 2013-09-04 10:01:16 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java 2013-09-04 14:04:01 +0000
@@ -83,6 +83,7 @@
{
this.smsMessageSender = smsMessageSender;
}
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -193,12 +194,13 @@
user.setPhoneNumber( each );
recipientsList.add( user );
}
- //message = messageSender.sendMessage( smsSubject, smsMessage, currentUser, true, recipients, gatewayId );
+ // message = messageSender.sendMessage( smsSubject, smsMessage,
+ // currentUser, true, recipients, gatewayId );
message = smsMessageSender.sendMessage( smsSubject, text, currentUser, recipientsList, false );
}
else if ( sendTarget.equals( "userGroup" ) )
{
-
+
UserGroup group = userGroupService.getUserGroup( userGroup );
if ( group == null )
@@ -214,7 +216,8 @@
return ERROR;
}
- //message = messageSender.sendMessage( smsSubject, smsMessage, currentUser, false, group.getMembers(), gatewayId );
+ // message = messageSender.sendMessage( smsSubject, smsMessage,
+ // currentUser, false, group.getMembers(), gatewayId );
message = smsMessageSender.sendMessage( smsSubject, text, currentUser, group.getMembers(), false );
}
else if ( sendTarget.equals( "user" ) )
@@ -234,8 +237,9 @@
return ERROR;
}
-
- //message = messageSender.sendMessage( smsSubject, smsMessage, currentUser, false, users, gatewayId );
+
+ // message = messageSender.sendMessage( smsSubject, smsMessage,
+ // currentUser, false, users, gatewayId );
message = smsMessageSender.sendMessage( smsSubject, text, currentUser, recipientsList, false );
}
}
@@ -261,38 +265,6 @@
message = smsMessageSender.sendMessage( smsSubject, text, currentUser, recipientsList, false );
}
- else
- {
- Patient patient = null;
-
- ObjectMapper mapper = new ObjectMapper().setVisibility( PropertyAccessor.FIELD,
- JsonAutoDetect.Visibility.ANY );
- mapper.disable( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES );
-
- recipients = mapper.readValue( recipients.iterator().next(), Set.class );
-
- for ( String patientId : recipients )
- {
- patient = patientService.getPatient( Integer.parseInt( patientId ) );
-
- if ( patient != null && patient.getPhoneNumber() != null && !patient.getPhoneNumber().isEmpty() )
- {
- User user = new User();
- user.setPhoneNumber( patient.getPhoneNumber() );
- recipientsList.add( user );
- }
- }
-
- if ( recipientsList.isEmpty() )
- {
- message = i18n.getString( "selected_persons_have_no_phone_number" );
-
- return ERROR;
- }
-
- message = smsMessageSender.sendMessage( smsSubject, text, currentUser, recipientsList, false );
-
- }
if ( message != null && !message.equals( "success" ) )
{
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/resources/org/hisp/dhis/sms/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-sms/src/main/resources/org/hisp/dhis/sms/i18n_module.properties 2013-03-20 04:23:51 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/resources/org/hisp/dhis/sms/i18n_module.properties 2013-09-04 14:04:01 +0000
@@ -116,4 +116,5 @@
program=Program
message_not_sent=Message not sent
date_of_birth=Date of birth
-age_year=Age (years)
\ No newline at end of file
+age_year=Age (years)
+org_unit_phone_number=Organisation unit phone number
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendSMSPage.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendSMSPage.vm 2013-08-22 08:03:53 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendSMSPage.vm 2013-09-04 14:04:01 +0000
@@ -43,10 +43,7 @@
<option value="phone">$i18n.getString( "raw_phone_number" )</option>
<option value="userGroup">$i18n.getString( "user_group" )</option>
<option value="user">$i18n.getString( "assigned_user_number" )</option>
- <option value="unit">$i18n.getString( "stakeholder_contact_person" )</option>
- #if( $auth.hasAccess( "dhis-web-sms", "showBeneficiarySMSForm" ) )
- <option value="patient" selected="true">$i18n.getString( "patients_registered" )</option>
- #end
+ <option value="unit">$i18n.getString( "org_unit_phone_number" )</option>
</select>
</td>
</tr>