dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24467
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11994: Fixed bug - Cannot save the new message template in program/program-stage; Display ID value inste...
------------------------------------------------------------
revno: 11994
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-09 23:11:17 +0700
message:
Fixed bug - Cannot save the new message template in program/program-stage; Display ID value instead of full name when to search person in Advanced-search
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-09-08 09:12:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-09-09 16:11:17 +0000
@@ -233,6 +233,11 @@
{
var params = "";
var programIds = "";
+ if(getFieldValue('programIdAddPatient')!='')
+ {
+ programIds += "&programIds=" + getFieldValue('programIdAddPatient');
+ params += "prg_" + getFieldValue('programIdAddPatient');
+ }
var programStageId = jQuery('#programStageAddPatient').val();
if( getFieldValue('searchByProgramStage') == "true" ){
var statusEvent = jQuery('#programStageAddPatientTR [id=statusEvent]').val();
@@ -257,7 +262,7 @@
if( idx == 0){
p = "&searchTexts=" + item.value;
if(item.value=='prg'){
- programIds += '&programIds=';
+ params += '&prg=';
flag = true;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2013-09-07 10:25:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2013-09-09 16:11:17 +0000
@@ -464,3 +464,5 @@
all_users_at_orgunit = All users at organisation unit
send_base_on = Send base on
characters_without_params = Characters without params
+scheduled_date = scheduled date
+send_message = Send message
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-09 16:11:17 +0000
@@ -31,27 +31,28 @@
userGroup.empty();
jQuery(".daysAllowedSendMessage").each( function( i, item ){
- daysAllowedSendMessages.append( "<option value='" + jQuery(item).attr('realvalue') + "' selected='true'></option>" );
+ var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
+ daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
});
jQuery(".templateMessage").each( function( i, item ){
- templateMessages.append( "<option value='" + item.value + "' selected='true'></option>" );
+ templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".dateToCompare").each( function( i, item ){
- datesToCompare.append( "<option value='" + item.value + "' selected='true'></option>" );
+ datesToCompare.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".sendTo").each( function( i, item ){
- sendTo.append( "<option value='" + item.value + "' selected='true'></option>" );
+ sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".whenToSend").each( function( i, item ){
- whenToSend.append( "<option value='" + item.value + "' selected='true'></option>" );
+ whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".userGroup").each( function( i, item ){
- userGroup.append( "<option value='" + item.value + "' selected='true'></option>" );
+ userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
var selectedPropertyIds = jQuery( "#selectedPropertyIds" );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2013-09-09 16:11:17 +0000
@@ -199,7 +199,6 @@
var i18n_compulsory_checkbox_title = '$encoder.jsEscape( $i18n.getString( "compulsory_checkbox_title" ) , "'")';
var i18n_reminder = '$encoder.jsEscape( $i18n.getString( "reminder" ) , "'")';
var i18n_remove_reminder = '$encoder.jsEscape( $i18n.getString( "remove_reminder" ) , "'")';
- var i18n_days_before_after_due_date = '$encoder.jsEscape( $i18n.getString( "days_before_after_due_date" ) , "'")';
var i18n_params = '$encoder.jsEscape( $i18n.getString( "params" ) , "'")';
var i18n_patient_name = '$encoder.jsEscape( $i18n.getString( "patient_name" ) , "'")';
var i18n_program_name = '$encoder.jsEscape( $i18n.getString( "program_name" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js 2013-09-09 16:11:17 +0000
@@ -39,42 +39,43 @@
jQuery("#selectedList").find("tr").each( function( i, item ){
- selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'></option>" );
+ selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
var checked = compulsory.attr('checked') ? true : false;
- compulsories.append( "<option value='" + checked + "' selected='true'></option>" );
+ compulsories.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var allowProvided = jQuery( item ).find( "input[name='allowProvided']:first");
checked = allowProvided.attr('checked') ? true : false;
- allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'></option>" );
+ allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
checked = displayInReport.attr('checked') ? true : false;
- displayInReports.append( "<option value='" + checked + "' selected='true'></option>" );
+ displayInReports.append( "<option value='" + checked + "' selected='true'><" + checked + "/option>" );
var allowDateInFuture = jQuery( item ).find( "input[name='allowDateInFuture']:first");
checked = allowDateInFuture.attr('checked') ? true : false;
- allowDateInFutures.append( "<option value='" + checked + "' selected='true'></option>" );
+ allowDateInFutures.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var displayAsRadioButton = jQuery( item ).find( "input[name='displayAsRadioButton']:first");
checked = displayAsRadioButton.attr('checked') ? true : false;
- displayAsRadioButtons.append( "<option value='" + checked + "' selected='true'></option>" );
+ displayAsRadioButtons.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
});
jQuery(".daysAllowedSendMessage").each( function( i, item ){
- daysAllowedSendMessages.append( "<option value='" + jQuery(item).attr('realvalue') + "' selected='true'></option>" );
+ var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
+ daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
});
jQuery(".templateMessage").each( function( i, item ){
- templateMessages.append( "<option value='" + item.value + "' selected='true'></option>" );
+ templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".sendTo").each( function( i, item ){
- sendTo.append( "<option value='" + item.value + "' selected='true'></option>" );
+ sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".whenToSend").each( function( i, item ){
- whenToSend.append( "<option value='" + item.value + "' selected='true'></option>" );
+ whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".userGroup").each( function( i, item ){
- userGroup.append( "<option value='" + item.value + "' selected='true'></option>" );
+ userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2013-09-09 16:11:17 +0000
@@ -94,7 +94,7 @@
for(var i in json.programStage.patientReminders){
var index = eval(i) + 1;
templateMessage += "<p class='bold'>" + i18n_template_reminder_message + " " + index + "</p>";
- templateMessage += "<p class='bold'>" + i18n_days_before_after_due_date + ":</p>" ;
+ templateMessage += "<p class='bold'>" + i18n_send_message + ":</p>" ;
templateMessage += "<p>" + json.programStage.patientReminders[i].daysAllowedSendMessage + "</p>";
templateMessage += "<p class='bold'>" + i18n_message + ":</p>";
templateMessage += "<p>" + json.programStage.patientReminders[i].templateMessage + "</p>";
@@ -321,7 +321,7 @@
+ '</td>'
+ '</tr>'
+ '<tr name="tr' + rowId + '">'
- + '<td><label>' + i18n_days_before_after_due_date + '</label></td>'
+ + '<td><label>' + i18n_send_message + '</label></td>'
+ '<td>'
+ '<input type="text" onchange="setRealDays(' + rowId + ')" style="width:100px;" realvalue="" id="daysAllowedSendMessage' + rowId + '" name="daysAllowedSendMessage' + rowId + '" class="daysAllowedSendMessage {validate:{required:true,number:true}}"/> '
+ i18n_days
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js 2013-09-09 16:11:17 +0000
@@ -44,38 +44,39 @@
var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
var checked = compulsory.attr('checked') ? true : false;
- compulsories.append( "<option value='" + checked + "' selected='true'></option>" );
+ compulsories.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var allowProvided = jQuery( item ).find( "input[name='allowProvided']:first");
checked = allowProvided.attr('checked') ? true : false;
- allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'></option>" );
+ allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
checked = displayInReport.attr('checked') ? true : false;
- displayInReports.append( "<option value='" + checked + "' selected='true'></option>" );
+ displayInReports.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var allowDateInFuture = jQuery( item ).find( "input[name='allowDateInFuture']:first");
checked = allowDateInFuture.attr('checked') ? true : false;
- allowDateInFutures.append( "<option value='" + checked + "' selected='true'></option>" );
+ allowDateInFutures.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
var displayAsRadioButton = jQuery( item ).find( "input[name='displayAsRadioButton']:first");
checked = displayAsRadioButton.attr('checked') ? true : false;
- displayAsRadioButtons.append( "<option value='" + checked + "' selected='true'></option>" );
+ displayAsRadioButtons.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
});
jQuery(".daysAllowedSendMessage").each( function( i, item ){
- daysAllowedSendMessages.append( "<option value='" + jQuery(item).attr('realvalue') + "' selected='true'></option>" );
+ var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
+ daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
});
jQuery(".templateMessage").each( function( i, item ){
- templateMessages.append( "<option value='" + item.value + "' selected='true'></option>" );
+ templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".sendTo").each( function( i, item ){
- sendTo.append( "<option value='" + item.value + "' selected='true'></option>" );
+ sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".whenToSend").each( function( i, item ){
- whenToSend.append( "<option value='" + item.value + "' selected='true'></option>" );
+ whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".userGroup").each( function( i, item ){
- userGroup.append( "<option value='" + item.value + "' selected='true'></option>" );
+ userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm 2013-09-06 09:06:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStage.vm 2013-09-09 16:11:17 +0000
@@ -89,6 +89,5 @@
var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ), "'")';
var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ), "'")';
var i18n_template_reminder_message = '$encoder.jsEscape( $i18n.getString( "template_reminder_message" ), "'")';
- var i18n_days_before_after_due_date = '$encoder.jsEscape( $i18n.getString( "days_before_after_due_date" ), "'")';
var i18n_message = '$encoder.jsEscape( $i18n.getString( "message" ), "'")';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-09-09 16:11:17 +0000
@@ -33,27 +33,28 @@
userGroup.empty();
jQuery(".daysAllowedSendMessage").each( function( i, item ){
- daysAllowedSendMessages.append( "<option value='" + jQuery(item).attr('realvalue') + "' selected='true'></option>" );
+ var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
+ daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
});
jQuery(".templateMessage").each( function( i, item ){
- templateMessages.append( "<option value='" + item.value + "' selected='true'></option>" );
+ templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".dateToCompare").each( function( i, item ){
- datesToCompare.append( "<option value='" + item.value + "' selected='true'></option>" );
+ datesToCompare.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".sendTo").each( function( i, item ){
- sendTo.append( "<option value='" + item.value + "' selected='true'></option>" );
+ sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".whenToSend").each( function( i, item ){
- whenToSend.append( "<option value='" + item.value + "' selected='true'></option>" );
+ whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
jQuery(".userGroup").each( function( i, item ){
- userGroup.append( "<option value='" + item.value + "' selected='true'></option>" );
+ userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
});
var selectedPropertyIds = jQuery( "#selectedPropertyIds" );
@@ -63,11 +64,11 @@
if(getFieldValue('type')!=3){
jQuery("#selectedList").find("tr").each( function( i, item ){
- selectedPropertyIds.append( "<option value='" + item.id + "' selected='true'></option>" );
+ selectedPropertyIds.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
var displayed = jQuery( item ).find( "input[name='displayed']:first");
var checked = displayed.attr('checked') ? true : false;
- personDisplayNames.append( "<option value='" + checked + "' selected='true'></option>" );
+ personDisplayNames.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
});
};
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2013-09-07 12:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2013-09-09 16:11:17 +0000
@@ -214,7 +214,7 @@
</td>
</tr>
<tr name="tr$index">
- <td><label>$i18n.getString( "send_when_to" )</label></td>
+ <td><label>$i18n.getString( "send_base_on" )</label></td>
<td>
<select type="text" id="whenToSend$index" name="whenToSend$index" class="whenToSend" onchange='whenToSendOnChange($index)' >
<option value="" >$i18n.getString("days_scheduled")</option>
@@ -232,7 +232,7 @@
#set($value=-1 * $value)
#end
<input type="text" id="daysAllowedSendMessage$index" name="daysAllowedSendMessage$index"
- class="daysAllowedSendMessage {validate:{required:true,number:true}}" value="$value"
+ class="daysAllowedSendMessage {validate:{required:true,number:true}}" value="$!value"
#if($!reminder.whenToSend==2) disabled #end onkeyup='setRealDays($index);' style="width:100px;" />
$i18n.getString('days')
<select id='time$index' name='time$index' onchange='setRealDays($index);' style="width:100px;"
@@ -320,7 +320,6 @@
var i18n_orgunit_name = '$encoder.jsEscape( $i18n.getString( "orgunit_name" ) , "'")';
var i18n_days_since_due_date = '$encoder.jsEscape( $i18n.getString( "days_since_due_date" ) , "'")';
var i18n_message = '$encoder.jsEscape( $i18n.getString( "message" ) , "'")';
- var i18n_days_before_after_due_date = '$encoder.jsEscape( $i18n.getString( "days_before_after_due_date" ) , "'")';
var i18n_recipients = '$encoder.jsEscape( $i18n.getString( "recipients" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';