← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13520: Fixed bug - Don't save post-comment ofevents in anonymous program.

 

------------------------------------------------------------
revno: 13520
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-31 21:08:47 +0700
message:
  Fixed bug - Don't save post-comment ofevents in anonymous program.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-09-16 17:07:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-12-31 14:08:47 +0000
@@ -85,7 +85,7 @@
 			style="width:100%;height:12px;" onkeyup='commentKeyup()'></textarea>
 	</th>
 	<th width="5%">
-		<input id="commentButton" name='commentButton' type="button" style='width:40px;' value="$i18n.getString('add')" onclick='addComment( byId("commentInput"), $programStageInstance.id )'>
+		<input id="commentButton" name='commentButton' type="button" style='width:40px;' value="$i18n.getString('add')" onclick='addComment( byId("commentInput"), getFieldValue("programStageInstanceId") )'>
 	</th>
 </tr>
 </table>
@@ -116,6 +116,7 @@
 	var i18n_enter_a_valid_number = '$encoder.jsEscape( $i18n.getString( "enter_a_valid_number" ) , "'" )';
 	var i18n_incomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "incomplete_confirm_message" ) , "'" )';
 	var i18n_add_patient_related_the_selected_event = '$encoder.jsEscape( $i18n.getString( "add_patient_related_the_selected_event" ) , "'" )';
+	var i18n_comment = '$encoder.jsEscape( $i18n.getString( "comment" ) , "'" )';
 	
 	var editDataEntryForm = eval($auth.hasAccess( "dhis-web-caseentry", "editDataEntryForm" ));
 	if( (getFieldValue('completed')=='true' && getFieldValue('blockEntryForm')=='true' ) 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm	2013-09-16 17:07:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm	2013-12-31 14:08:47 +0000
@@ -6,6 +6,7 @@
     "executionDate": "$!format.formatDate( $programStageInstance.executionDate )",
     "status": "$!programStageInstance.getEventStatus()",
     "completed": "$!programStageInstance.completed",
+    "patientComment": "$!programStageInstance.patientComment.commentText",
     #if($programStageInstance.programStage.captureCoordinates)
     "latitude": "$!latitude",
     "longitude": "$!longitude",