dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21078
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9882: (mobile) Fixed bug in sending SMS based user group
------------------------------------------------------------
revno: 9882
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-02-23 02:59:51 +0700
message:
(mobile) Fixed bug in sending SMS based user group
modified:
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_vi_VN.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/sendSMS.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/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-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 2013-02-21 06:44:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties 2013-02-22 19:59:51 +0000
@@ -89,6 +89,7 @@
organisation_unit_level=Organisation unit level
chidren_only=Children only
please_select_a_program=Please select a program
+please_select_user_group=Please select user group
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.
@@ -145,6 +146,7 @@
selected_persons_have_no_phone_number=The selected persons have no phone number
selected_user_group_is_unavailable=The selected user group is unavailable
selected_user_group_has_no_member=The selected user group has no member
+person_list_empty=List should not be empty
# ------------------------------------------------------------------------------
# SMS COMMAND LOCALIZATION
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module_vi_VN.properties 2013-02-21 06:44:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module_vi_VN.properties 2013-02-22 19:59:51 +0000
@@ -51,6 +51,7 @@
organisation_unit_level=C\u1ea5p \u0111\u01a1n v\u1ecb
chidren_only=Ch\u1ec9 ch\u1ecdn \u0111\u01a1n v\u1ecb con
please_select_a_program=H\u00e3y ch\u1ecdn m\u1ed9t ch\u01b0\u01a1ng tr\u00ecnh
+please_select_user_group=H\u00e3y ch\u1ecdn nh\u00f3m ng\u01b0\u1eddi d\u00f9ng
there_is_no_program=Kh\u00f4ng c\u00f3 ch\u01b0\u01a1ng tr\u00ecnh n\u00e0o \u0111\u01b0\u1ee3c ch\u1ecdn. Tin nh\u1eafn s\u1ebd kh\u00f4ng \u0111\u01b0\u1ee3c g\u1eedi \u0111i
please_select_a_gateway_type_to_send_sms=H\u00e3y ch\u1ecdn lo\u1ea1i gateway \u0111\u1ec3 g\u1eedi tin nh\u1eafn
service_stopped_cannot_send_sms=D\u1ecbch v\u1ee5 g\u1eedi tin tr\u00ean m\u00e1y ch\u1ee7 t\u1ea1m d\u1eebng. Tin nh\u1eafn kh\u00f4ng th\u1ec3 g\u1eedi \u0111i
@@ -81,6 +82,7 @@
selected_persons_have_no_phone_number=C\u00e1c b\u1ec7nh nh\u00e2n \u0111\u01b0\u1ee3c ch\u1ecdn \u0111\u1ec1u kh\u00f4ng c\u00f3 s\u1ed1 di \u0111\u1ed9ng \u0111i k\u00e8m
selected_user_group_is_unavailable=Nh\u00f3m ng\u01b0\u1eddi d\u00f9ng \u0111\u01b0\u1ee3c ch\u1ecdn hi\u1ec7n kh\u00f4ng t\u1ed3n t\u1ea1i
selected_user_group_has_no_member=Nh\u00f3m ng\u01b0\u1eddi d\u00f9ng \u0111\u01b0\u1ee3c ch\u1ecdn hi\u1ec7n kh\u00f4ng c\u00f3 th\u00e0nh vi\u00ean
+person_list_empty=Danh s\u00e1ch ng\u01b0\u1eddi nh\u1eadn SMS kh\u00f4ng th\u1ec3 tr\u1ed1ng
# ------------------------------------------------------------------------------
# SMS COMMAND LOCALIZATION
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/sendSMS.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/sendSMS.js 2013-02-21 06:44:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/javascript/sendSMS.js 2013-02-22 19:59:51 +0000
@@ -73,6 +73,16 @@
}
}
}
+ else if ( _target == "userGroup" )
+ {
+ var userGroup = getFieldValue( _target );
+
+ if ( userGroup == null )
+ {
+ showErrorMessage( i18n_please_select_user_group );
+ return;
+ }
+ }
else if ( _target == "user" || _target == "unit" )
{
if ( !isOrgunitSelected )
@@ -91,7 +101,7 @@
p.recipients.push( item.value );
});
}
- else { markInvalid( "recipients", i18n_list_empty ); }
+ else { markInvalid( "recipients", i18n_person_list_empty ); }
}
jQuery.postUTF8( _form.action,
@@ -99,7 +109,8 @@
recipients: JSON.stringify( p.recipients ),
gatewayId: getFieldValue( 'gatewayId' ),
smsMessage: getFieldValue( 'smsMessage' ),
- sendTarget: getFieldValue( 'sendTarget' )
+ sendTarget: getFieldValue( 'sendTarget' ),
+ userGroup: getFieldValue( 'userGroup' )
}, function ( json )
{
if ( json.response == "success" ) {
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/sendSMSPage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/sendSMSPage.vm 2013-02-22 04:15:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/sendSMSPage.vm 2013-02-22 19:59:51 +0000
@@ -19,7 +19,9 @@
});
var i18n_no_recipient = '$encoder.jsEscape( $i18n.getString( "no_recipient" ) , "'")';
+ var i18n_person_list_empty = '$encoder.jsEscape( $i18n.getString( "person_list_empty" ) , "'")';
var i18n_please_verify_phone = '$encoder.jsEscape( $i18n.getString( "please_verify_phone" ) , "'")';
+ var i18n_please_select_user_group = '$encoder.jsEscape( $i18n.getString( "please_select_user_group" ) , "'")';
var i18n_please_select_orgunit = '$encoder.jsEscape( $i18n.getString( "please_select_orgunit" ) , "'")';
</script>