dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21650
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10301: Fix bugs in Sending-sms-for-persons function in dhis-web-sms module
------------------------------------------------------------
revno: 10301
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-03-19 12:39:35 +0700
message:
Fix bugs in Sending-sms-for-persons function in dhis-web-sms module
modified:
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/struts.xml
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/css/patient.css
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/javascript/patient.js
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/searchPatientCritetia.vm
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendBeneficiarySMSPage.vm
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/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-15 18:55:26 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/resources/org/hisp/dhis/sms/i18n_module.properties 2013-03-19 05:39:35 +0000
@@ -69,8 +69,8 @@
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
+stakeholder_contact_person=Stakeholder (Contact person)
+patients_registered=Persons registered
programs=Programs
organisation_unit_level=Organisation unit level
chidren_only=Children only
@@ -103,7 +103,7 @@
search_patients_by_attributes=Search persons by attributes
user_group=User Group
no_message=Please type your message before sending
-do_not_send_patient_confidential_messages_using_sms=Do not send patient confidential messages using sms
+do_not_send_patient_confidential_messages_using_sms=Do not send person confidential messages using sms
please_select_a_gateway_type_to_send_sms=Please select a default gateway (Maintenance -> ) to send sms
there_is_no_user_assigned_to_selected_units=There is no user assigned to selected units
selected_units_have_no_phone_number=The selected units have no phone number
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-sms/src/main/resources/struts.xml 2013-03-12 05:40:42 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/resources/struts.xml 2013-03-19 05:39:35 +0000
@@ -82,7 +82,14 @@
</result>
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_MOBILE_SENDSMS</param>
- </action>
+ </action>
+
+
+ <action name="searchAllFacilities"
+ class="org.hisp.dhis.sms.action.NoAction">
+ <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <param name="requiredAuthorities">F_SEARCH_PATIENT_IN_ALL_FACILITIES</param>
+ </action>
</package>
</struts>
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/css/patient.css'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/css/patient.css 2013-03-15 18:55:26 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/css/patient.css 2013-03-19 05:39:35 +0000
@@ -1,22 +1,17 @@
-table
-{
- margin-bottom:10px;
- font-size: 13px;
- line-height:18px;
-}
-
-input.button
-{
- width: 150px;
- padding-left:5px;
- padding-right:5px;
-}
-
-input.imgButton
-{
- width:20px;
- height:20px;
- cursor: pointer;
+
+input[type="text"]
+{
+ width: 260px;
+}
+
+select
+{
+ width: 265px;
+}
+
+select.search-field
+{
+ width: 180px;
}
.hidden
@@ -24,61 +19,6 @@
display:none;
}
-.text-column
-{
- text-align:left;
- padding-right:20px;
- padding-left:5px;
-}
-
-.infor
-{
- border:1px solid #808080;
- vertical-align:top;
- padding:10px;
-}
-
-.buttons
-{
- text-align:right;
- padding-bottom:10px;
- width:100%;
-}
-
-.list-table
-{
- width:100%;
-}
-
-.heading-column { width : 450px;}
-td.input-column { width : 390px;}
-td.input-column input[type="text"]{ width: 360px;}
-td.input-column select { width: 367px;}
-td.error {padding-left:1em}
-
-.infor td{vertical-align: top;}
-
-.focusCell{background-color: #AFCCFF}
-.errorCell{background-color: #FFCFCF}
-.sectionOpen {display: true}
-.sectionClose{ display: none}
-.togglePanel.open {height:25px;padding-left:25px; background-image: url(../images/open.gif) ; background-repeat: no-repeat; background-position: top left}
-.togglePanel.close {height:25px;padding-left:25px; background-image: url(../images/close.gif) ; background-repeat: no-repeat; background-position: top left}
-
-.warnmessage {
- color: red;
-}
-
-#facilityCol
-{
- width: 130px;
-}
-
-fieldset
-{
- border: 1px solid #3f5d8e;
-}
-
.overlaps
{
background-color: #BAFFBC;
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/javascript/patient.js 2013-03-15 19:24:30 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/javascript/patient.js 2013-03-19 05:39:35 +0000
@@ -8,6 +8,7 @@
enable('advancedSearchBtn');
setFieldValue( "orgunitName", orgUnitNames[0] );
+ setFieldValue( "orgunitId", orgUnits[0] );
}
selection.setListenerFunction( organisationUnitSelected );
@@ -74,18 +75,22 @@
var rowId = 'advSearchBox' + jQuery('#advancedSearchTB select[name=searchObjectId]').length + 1;
var contend = '<td>' + getInnerHTML('searchingAttributeIdTD') + '</td>';
contend += '<td>' + searchTextBox ;
- contend += ' <input type="button" name="clearSearchBtn" class="large-button" value="' + i18n_clear + '" onclick="removeAttributeOption(' + "'" + rowId + "'" + ');"></td>';
+ contend += ' <input type="button" name="clearSearchBtn" class="normal-button" value="' + i18n_clear + '" onclick="removeAttributeOption(' + "'" + rowId + "'" + ');"></td>';
contend = '<tr id="' + rowId + '">' + contend + '</tr>';
jQuery('#advancedSearchTB').append( contend );
+ var rowspan = eval( jQuery('[name=addAndSearchBtn]').attr('rowspan') );
+ jQuery('[name=addAndSearchBtn]').attr('rowspan', rowspan + 1);
}
function removeAttributeOption( rowId )
{
jQuery( '#' + rowId ).remove();
- if( jQuery( '#advancedSearchTB tr' ).length == 3 ){
+ if( jQuery( '#advancedSearchTB tr' ).length == 2 ){
jQuery('#advancedSearchTB [name=clearSearchBtn]').attr('disabled', true);
- }
+ }
+ var rowspan = eval( jQuery('[name=addAndSearchBtn]').attr('rowspan') );
+ jQuery('[name=addAndSearchBtn]').attr('rowspan', rowspan - 1);
}
//------------------------------------------------------------------------------
@@ -143,7 +148,7 @@
function getGenderSelector()
{
- var genderSelector = '<select id="searchText" name="searchText">';
+ var genderSelector = '<select id="searchText" name="searchText" style="width:200px;">';
genderSelector += '<option value="M">' + i18n_male + '</option>';
genderSelector += '<option value="F">' + i18n_female + '</option>';
genderSelector += '<option value="T">' + i18n_transgender + '</option>';
@@ -154,28 +159,31 @@
function getAgeTextBox( container )
{
var ageField = '<select id="dateOperator" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
- ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:220px;">';
+ ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:160px;">';
return ageField;
}
function getDateField( container )
{
- var dateField = '<select id="dateOperator" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
- dateField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:200px;" onkeyup="searchPatientsOnKeyUp( event );">';
+ var dateField = '<select id="dateOperator_' + container + '" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
+ dateField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:160px;" onkeyup="searchPatientsOnKeyUp( event );">';
return dateField;
}
//-----------------------------------------------------------------------------
// Search Patient
//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+// Search Patient
+//-----------------------------------------------------------------------------
function searchPatientsOnKeyUp( event )
{
var key = getKeyCode( event );
- if ( key == 13 )// Enter
+ if ( key==13 )// Enter
{
- searchAdvancedPatients()();
+ validateAdvancedSearch();
}
}
@@ -191,10 +199,8 @@
hideById( 'listPatientDiv' );
var flag = true;
var dateOperator = '';
-
- if (getFieldValue('searchByProgramStage') == "false"
- || ( getFieldValue('searchByProgramStage') == "true"
- && jQuery( '#advancedSearchTB tr' ).length > 2) ){
+
+ if (jQuery( '#advancedSearchTB tr' ).length > 1 ){
jQuery("#searchDiv :input").each( function( i, item )
{
var elementName = $(this).attr('name');
@@ -205,7 +211,7 @@
}
});
}
-
+
if(flag){
contentDiv = 'listPatientDiv';
jQuery( "#loaderDiv" ).show();
@@ -217,16 +223,6 @@
{
var params = "";
var programIds = "";
- var programStageId = jQuery('#programStageAddPatient').val();
- if( getFieldValue('searchByProgramStage') == "true" ){
- var statusEvent = jQuery('#programStageAddPatientTR [id=statusEvent]').val();
- var startDueDate = getFieldValue('startDueDate');
- var endDueDate = getFieldValue('endDueDate');
- params = '&searchTexts=stat_' + getFieldValue('programIdAddPatient')
- + '_' + startDueDate + '_' + endDueDate
- + "_" + getFieldValue('orgunitId')
- + '_false_' + statusEvent;
- }
var flag = false;
jQuery( '#advancedSearchTB tr' ).each( function( i, row ){
@@ -267,22 +263,11 @@
}
});
- var searchInAllFacility = byId('searchInAllFacility').checked;
- if( getFieldValue('searchByProgramStage') == "false" && !searchInAllFacility ){
- p += "_" + getFieldValue('orgunitId');
- }
params += p;
});
- params += '&listAll=false';
- if( getFieldValue('searchByProgramStage') == "false"){
- var searchInAllFacility = byId('searchInAllFacility').checked;
- params += '&searchBySelectedOrgunit=' + !searchInAllFacility;
- }
- else
- {
- params += '&searchBySelectedOrgunit=false';
- }
+ var searchInAllFacility = byId('searchInAllFacility').checked;
+ params += '&searchBySelectedOrgunit=' + !searchInAllFacility;
params += programIds;
return params;
@@ -295,6 +280,7 @@
type:"POST",
data: params,
success: function( html ){
+ setTableStyles();
statusSearching = 1;
setInnerHTML( 'listPatientDiv', html );
showById('listPatientDiv');
@@ -303,6 +289,7 @@
}
});
}
+
// ----------------------------------------------------------------
// Get Params form Div
// ----------------------------------------------------------------
@@ -347,47 +334,75 @@
// Load all patients
// -----------------------------------------------------------------------------
+
function listAllPatient()
{
- hideById( 'listPatientDiv' );
- hideById( 'advanced-search' );
+ hideById('listPatientDiv');
+ hideById('editPatientDiv');
+ hideById('migrationPatientDiv');
+ hideById('advanced-search');
jQuery('#loaderDiv').show();
contentDiv = 'listPatientDiv';
-
- var programId = getFieldValue('programIdAddPatient');
-
- if ( !programId || programId == '' )
- {
- jQuery('#listPatientDiv').load('searchRegistrationPatient.action',{ listAll:true },
- function(){
- setTableStyles();
- statusSearching = 0;
- showById('listPatientDiv');
- jQuery('#loaderDiv').hide();
- });
- }
- else
- {
- jQuery('#listPatientDiv').load('searchRegistrationPatient.action',
- {
- listAll:false,
- searchBySelectedOrgunit: true,
- programIds: programId,
- searchTexts: 'prg_' + programId
- },
- function()
- {
- setTableStyles();
- statusSearching = 0;
- showById('listPatientDiv');
- jQuery('#loaderDiv').hide();
- });
- }
-
+ if( getFieldValue('programIdAddPatient')=='')
+ {
+ jQuery('#listPatientDiv').load('searchRegistrationPatient.action',{
+ listAll:true
+ },
+ function(){
+ setTableStyles();
+ statusSearching = 0;
+ showById('listPatientDiv');
+ jQuery('#loaderDiv').hide();
+ });
+ }
+ else
+ {
+ jQuery('#listPatientDiv').load('searchRegistrationPatient.action',{
+ listAll:false,
+ searchBySelectedOrgunit: true,
+ programIds: getFieldValue('programIdAddPatient'),
+ searchTexts: 'prg_' + getFieldValue('programIdAddPatient')
+ },
+ function(){
+ setTableStyles();
+ statusSearching = 0;
+ showById('listPatientDiv');
+ jQuery('#loaderDiv').hide();
+ });
+ }
hideLoader();
}
+function searchPatient()
+{
+ var params = '';
+ jQuery( '#advancedSearchTB tbody tr' ).each( function( i, row ){
+ jQuery( this ).find(':input').each( function( idx, item ){
+ if( idx == 0){
+ params += "searchTexts=" + item.value;
+ }
+ else if( idx == 1){
+ params += "_" + htmlEncode( item.value.toLowerCase() );
+ }
+ })
+ });
+ params += '&listAll=false';
+ params += '&searchBySelectedOrgunit=' + byId('searchBySelectedOrgunit').checked;
+
+ $.ajax({
+ url: 'searchRegistrationPatient.action',
+ type:"POST",
+ data: params,
+ success: function( html ){
+ statusSearching = 1;
+ setInnerHTML( 'listPatientDiv', html );
+ showById('listPatientDiv');
+ jQuery( "#loaderDiv" ).hide();
+ }
+ });
+}
+
function addPhoneToList( elementList, _id, _patientName, _phoneNo )
{
var list = jQuery( "#" + elementList );
@@ -406,54 +421,3 @@
jQuery( "tr#tr" + _id ).show();
}
-
-function searchPatient()
-{
- var params = '';
- jQuery( '#advancedSearchTB tbody tr' ).each( function( i, row ){
- jQuery( this ).find(':input').each( function( idx, item ){
- if( idx == 0){
- params += "searchTexts=" + item.value;
- }
- else if( idx == 1){
- params += "_" + htmlEncode( item.value.toLowerCase() );
- }
- })
- });
- params += '&listAll=false';
- params += '&searchBySelectedOrgunit=' + byId('searchBySelectedOrgunit').checked;
-
- $.ajax({
- url: 'searchRegistrationPatient.action',
- type:"POST",
- data: params,
- success: function( html ){
- statusSearching = 1;
- setInnerHTML( 'listPatientDiv', html );
- showById('listPatientDiv');
- jQuery( "#loaderDiv" ).hide();
- }
- });
-}
-
-//--------------------------------------------------------------------------------------------
-// Migration patient
-//--------------------------------------------------------------------------------------------
-
-function getPatientLocation( patientId )
-{
- hideById('listPatientDiv');
- hideById('selectDiv');
- hideById('searchPatientDiv');
-
- jQuery('#loaderDiv').show();
-
- jQuery('#migrationPatientDiv').load("getPatientLocation.action",
- {
- patientId: patientId
- }
- , function(){
- showById( 'migrationPatientDiv' );
- jQuery( "#loaderDiv" ).hide();
- });
-}
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm 2013-03-14 03:32:14 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm 2013-03-19 05:39:35 +0000
@@ -131,7 +131,7 @@
<td>
#if ( $!patient.phoneNumber && $!patient.phoneNumber != "" )
- <a href="javascript:addPhoneToList( 'recipients', '$patient.id', '$patient.getFullName()', '$!patient.phoneNumber' )" title='$i18n.getString( "add_phone_to_list" )'>
+ <a href="javascript:addPhoneToList( 'recipients', '$patient.id', '$value', '$!patient.phoneNumber' )" title='$i18n.getString( "add_phone_to_list" )'>
<img src="../images/move_down.png" alt='$i18n.getString( "add_phone_to_list" )' /></a>
#else
<img src="../dhis-web-sms/images/question.png" title='$i18n.getString( "no_phone" )' />
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/searchPatientCritetia.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/searchPatientCritetia.vm 2013-03-19 02:51:05 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/searchPatientCritetia.vm 2013-03-19 05:39:35 +0000
@@ -1,3 +1,4 @@
+
<table>
<tbody>
<tr>
@@ -9,10 +10,9 @@
<input type="text" id='orgunitName' readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.displayName )" #else value="[$i18n.getString( 'please_select_village' )]" #end >
</td>
<td rowspan='2' valign='bottom'>
- <input type="button" id='listPatientBtn' value="$i18n.getString( 'list_all_patients' )" onclick='listAllPatient();'/>
- <input type="button" class='large-button' id='advancedSearchBtn' value='$i18n.getString( "advance_search" )' onclick="jQuery('#advanced-search').toggle();" disabled="true" />
+ <input type="button" class='large-button' id='listPatientBtn' value="$i18n.getString( 'list_all_patients' )" onclick='listAllPatient();'/>
+ <input type="button" class='large-button' id='advancedSearchBtn' value='$i18n.getString( "advance_search" )' onclick="jQuery('#advanced-search').toggle();" />
</td>
- <td><span id='warnmessage' style='color:red'></span></td>
</tr>
<tr id='programAddPatientTR'>
<td>$i18n.getString('program')</td>
@@ -29,28 +29,11 @@
</tr>
</tbody>
</table>
+<br>
<div id="advanced-search" class='hidden advanced-search'>
<table>
- <tr id='programStageAddPatientTR' class='hidden'>
- <td>$i18n.getString('status')</td>
- <td>
- <select id="statusEvent" name="statusEvent">
- <option value='4'>$i18n.getString("overdue")</option>
- <option value='2'>$i18n.getString("incomplete")</option>
- <option value='1'>$i18n.getString("completed")</option>
- <option value='3'>$i18n.getString("scheduled_in_future")</option>
- </select>
- </td>
- </tr>
- <tr id='dueDateTR' class='hidden'>
- <td>$i18n.getString('due_date_from_to')</td>
- <td>
- <input type='text' id='startDueDate' name='startDueDate' style='width:105px;'>
- <input type='text' id='endDueDate' name='endDueDate' style='width:105px;'>
- </td>
- </tr>
- #if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
+ #if( $auth.hasAccess( "dhis-web-sms", "searchAllFacilities" ) )
<tr id='searchBySelectedUnitTD'>
<td>
$i18n.getString('search_in_all_facilities')
@@ -60,6 +43,7 @@
#else
<input type='checkbox' class='hidden' id='searchInAllFacility' name='searchInAllFacility' />
#end
+
<tr>
<td id='searchingAttributeIdTD' class="hidden">
<select class='search-field' id="searchObjectId" name="searchObjectId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchObjectOnChange(this)">
@@ -80,14 +64,11 @@
<tr>
<td></td>
<td></td>
- <td rowspan='30' valign='bottom'>
- <input type="button" class='large-button' value='$i18n.getString( "add" )' onclick='addAttributeOption();'>
- </td>
- <td rowspan='30' valign='bottom' align="right" >
- <input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
- </td>
- <td rowspan='30' valign='bottom' align="right" >
- <input type="button" class='large-button hidden' id='sendSmsToListBtn' value="$i18n.getString('send_message')" onclick="setFieldValue('sendToList', true);showSendSmsForm();" >
+ <td name='addAndSearchBtn' rowspan='2' valign='bottom'>
+ <input type="button" class='normal-button' value='$i18n.getString( "add" )' onclick='addAttributeOption();'>
+ </td>
+ <td name='addAndSearchBtn' rowspan='2' valign='bottom' align="right" >
+ <input type="button" class='normal-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
</td>
</tr>
<tr id='advSearchBox0'>
@@ -106,15 +87,10 @@
<em title="$i18n.getString( 'required' )" class="required">*</em></label>
</td>
<td>
- <input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
- <input type="button" class='large-button' name="clearSearchBtn" value='$i18n.getString( "clear" )' onclick="removeAttributeOption('advSearchBox0');" disabled>
+ <input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );' style='width:200px;'>
+ <input type="button" class='normal-button' name="clearSearchBtn" value='$i18n.getString( "clear" )' onclick="removeAttributeOption('advSearchBox0');" disabled>
</td>
</tr>
- <tr>
- <td></td>
- <td></td>
-
- </tr>
</tbody>
</table>
</div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendBeneficiarySMSPage.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendBeneficiarySMSPage.vm 2013-03-19 02:51:05 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendBeneficiarySMSPage.vm 2013-03-19 05:39:35 +0000
@@ -29,8 +29,8 @@
<h3>$i18n.getString( "send_sms_beneficiary" )</h3>
#if ( $!gatewayMap && $!gatewayMap.size() > 0 )
<div>
-<form id="sendSMSForm" name="sendSMSForm" action="sendSMS.action">
- <input type="hidden" id="isShowPatientList" name="isShowPatientList" />
+<form id="sendSMSForm" name="sendSMSForm" action="sendSMS.action" onsubmit="selectAllById('recipients')">
+ <input type="hidden" id="orgunitId" name="orgunitId" />
<table id="detailsList">
<col width="85px"/>
<tbody>
@@ -41,8 +41,8 @@
<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_number" )</option>
- <option value="patient" selected="true">$i18n.getString( "patient_number" )</option>
+ <option value="unit">$i18n.getString( "stakeholder_contact_person" )</option>
+ <option value="patient" selected="true">$i18n.getString( "patients_registered" )</option>
</select>
</td>
</tr>
@@ -70,7 +70,7 @@
</tbody>
<tbody>
- <tr><td><input type="submit" name="send" value="$i18n.getString( 'send_sms' )"/></td></tr>
+ <tr><td><input type="submit" name="send" value="$i18n.getString( 'send_sms' )" /></td></tr>
</tbody>
</table>
</form>
@@ -127,57 +127,14 @@
}
}
- var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ) , "'")';
- var i18n_please_select_village = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_village" ), "'")' + ']';
- var i18n_specify_search_criteria = '$encoder.jsEscape( $i18n.getString( "specify_search_criteria" ) , "'")';
- var i18n_select_program = '[' + '$encoder.jsEscape( $i18n.getString( "select_program" ), "'")' + ']';
- var i18n_list_all_patient = '$encoder.jsEscape( $i18n.getString( "list_all_patient" ) , "'")';
- var i18n_list_patients_by_program = '$encoder.jsEscape( $i18n.getString( "list_patients_by_program" ) , "'" )';
- var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
- var i18n_date_invalid = '$encoder.jsEscape( $i18n.getString( "date_invalid" ) , "'")';
- var i18n_oucode_must_have_9_digits = '$encoder.jsEscape( $i18n.getString( "oucode_must_be_valid" ) , "'")';
- var i18n_patient_identifiers = '$encoder.jsEscape( $i18n.getString( "patient_identifiers" ) , "'")';
- var i18n_patient_attributes = '$encoder.jsEscape( $i18n.getString( "patient_attributes" ) , "'")';
- var i18n_patient_id = '$encoder.jsEscape( $i18n.getString( "id" ) , "'")';
- var i18n_patient_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ) , "'")';
- var i18n_patient_demographics = '$encoder.jsEscape( $i18n.getString( "demographics" ) , "'")';
- var i18n_patient_gender = '$encoder.jsEscape( $i18n.getString( "gender" ) , "'")';
- var i18n_patient_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ) , "'")';
- var i18n_patient_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
- var i18n_patient_age = '$encoder.jsEscape( $i18n.getString( "age" ) , "'")';
- var i18n_patient_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ) , "'")';
- var i18n_patient_phone_number = '$encoder.jsEscape( $i18n.getString( "phone_number" ) , "'")';
- var i18n_edit_this_patient = '$encoder.jsEscape( $i18n.getString( "edit_this_patient" ) , "'")';
- var i18n_no_duplicate_found = '$encoder.jsEscape( $i18n.getString( "no_duplicate_found" ) , "'")';
- var i18n_patient_system_id = '$encoder.jsEscape( $i18n.getString( "patient_system_id" ) , "'")';
- var i18n_child_representative = '$encoder.jsEscape( $i18n.getString( "child_representative" ) , "'")';
- var i18n_no_patients_found = '$encoder.jsEscape( $i18n.getString( "no_patients_found" ) , "'")';
- var i18n_search_result = '$encoder.jsEscape( $i18n.getString( "search_result" ) , "'")';
- var i18n_duplicated_patient_list = '$encoder.jsEscape( $i18n.getString( "duplicated_patient_list" ) , "'")';
- var i18n_duplicate_warning = '$encoder.jsEscape( $i18n.getString( "duplicate_warning" ) , "'")';
- var i18n_search_by_name_identifier = '$encoder.jsEscape( $i18n.getString( "search_by_name_identifier" ) , "'")';
- var i18n_search_by_program = '$encoder.jsEscape( $i18n.getString( "search_by_program" ) , "'")';
- var i18n_create_new_patient = '$encoder.jsEscape( $i18n.getString( "create_new_patient" ) , "'")';
+ var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
+ var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
+ var i18n_transgender = '$encoder.jsEscape( $i18n.getString( "transgender" ) , "'")';
var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
- var i18n_choose_this_person = '$encoder.jsEscape( $i18n.getString( "choose_this_person" ) , "'")';
- var i18n_representative_info = '$encoder.jsEscape( $i18n.getString( "representative_info" ) , "'")';
- var i18n_select = '[' + '$encoder.jsEscape( $i18n.getString( "select" ), "'")' + ']';
- var i18n_program_stages_history_plan = '$encoder.jsEscape( $i18n.getString( "program_stages_history_plan" ) , "'")';
-
- var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
- var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
- var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
- var i18n_value_must_negative_integer = '$encoder.jsEscape( $i18n.getString( "value_must_negative_integer" ) , "'")';
-
- var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
- var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
- var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
-
- var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
- var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
+ var i18n_specify_search_criteria = '$encoder.jsEscape( $i18n.getString( "specify_search_criteria" ) , "'")';
var i18n_clear = '$encoder.jsEscape( $i18n.getString( "clear" ) , "'")';
-
+
// -1: no search anything
// 0: show list all patient
// 1: search with conditions
@@ -190,19 +147,8 @@
// Search field
// ----------------------------------------------------------------
- var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
-
- var trueFalseBox = '<select id="searchText" name="searchText" style="width:20.2em" >';
- trueFalseBox += '<option value="true">' + i18n_yes + '</option>';
- trueFalseBox += '<option value="false">' + i18n_no + '</option>';
- trueFalseBox += '</select>';
-
- var genderSelector = '<select id="searchText" name="searchText" style="width:20.2em" >';
- genderSelector += '<option value="M">$i18n.getString( "male" )</option>';
- genderSelector += '<option value="F">$i18n.getString( "female" )</option>';
- genderSelector += '</select>';
-
- var programComboBox = '<select class="search-field" id="searchText" name="searchText" >';
+ var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );" style="width:202px;">';
+ var programComboBox = '<select id="searchText" name="searchText" style="width:205px;">';
#foreach ( $program in $programs )
#if( $program.type!='3')
programComboBox += '<option value="$program.id">$program.displayName</option>';
=== 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-03-14 03:32:14 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/sendSMSPage.vm 2013-03-19 05:39:35 +0000
@@ -37,7 +37,7 @@
<h3>$i18n.getString( "send_sms" )</h3>
#if ( $!gatewayMap && $!gatewayMap.size() > 0 )
-<form id="sendSMSForm" name="sendSMSForm" action="sendSMS.action">
+<form id="sendSMSForm" name="sendSMSForm" action="sendSMS.action" >
<table id="detailsList">
<col width="90px"/>
<tbody>
@@ -48,8 +48,8 @@
<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_number" )</option>
- <option value="patient">$i18n.getString( "patient_number" )</option>
+ <option value="unit">$i18n.getString( "stakeholder_contact_person" )</option>
+ <option value="patient">$i18n.getString( "patient_registered" )</option>
</select>
</td>
</tr>