← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12205: Fixed bug - Error thrown when loading entry form in Dashboard.

 

------------------------------------------------------------
revno: 12205
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-23 16:42:21 +0700
message:
  Fixed bug - Error thrown when loading entry form in Dashboard.
modified:
  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/patientDashboard.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.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-23 09:00:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-09-23 09:42:21 +0000
@@ -685,7 +685,7 @@
 				+ 'reportDate="" '
 				+ 'reportDateDes="' + selectedStage.attr('reportDateDes') + '" '
 				+ 'dueDate="' + dueDate + '" '
-				+ 'openAfterEnrollment="' + selectedStage.attr('selectedStage') + '" '
+				+ 'openAfterEnrollment="' + selectedStage.attr('openAfterEnrollment') + '" '
 				+ 'reportDateToUse="' + selectedStage.attr('reportDateToUse') + '" '
 				+ 'class="stage-object" '
 				+ 'value="'+ programStageName + '&#13;&#10;&nbsp;' + dueDate + '" '

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2013-09-23 07:25:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2013-09-23 09:42:21 +0000
@@ -122,26 +122,38 @@
 		</p>
 		<div class="contentProviderTable">
 			<table id='activeTB' name='activeTB' style='cursor:pointer;'>
-				#foreach( $programInstance in $activeProgramInstances )
-				
-					#set($programStageInstance = $programInstance.getActiveProgramStageInstance())
-					#if( $!programStageInstance)
+				#foreach( $programInstance in $activeProgramInstances ) 
+					#set($programStageInstance='') 
+					#foreach ( $psi in $programInstance.programStageInstances )
+						#if( $psi.programStage.openAfterEnrollment=='true' && $psi.getStatus() != 1 && $psi.getStatus() != 5 )
+							#set($programStageInstance=$psi)
+						#end
+					#end
+					
+					#if($programStageInstance=='')
+							#foreach( $psi in $programInstance.programStageInstances )
+								#if ( $psi.getStatus() != 1 && $psi.getStatus() != 5  )
+									#set($programStageInstance=$psi)
+								#end
+							#end
+					#end
+					#if( $!programStageInstance!='')
 						#set( $status = $programStageInstance.getEventStatus() )
-							<tr id='tr1_$programInstance.id' type='$programInstance.program.type'
-								programStageInstanceId='$programStageInstance.id' 
-								relationshipText='$!programInstance.program.relationshipText'
-								relationshipType='$!programInstance.program.relationshipType.id'
-								relationshipSide='$!programInstance.program.relationshipSide'
-								relatedProgram='$!programInstance.program.relatedProgram.id'
-								programId='$programInstance.program.id'
-								style='cursor:pointer;'
-								onclick='javascript:setFieldValue("programIdAddPatient",$programInstance.program.id);loadActiveProgramStageRecords("$programInstance.id", "$programStageInstance.id")' >
-								<td id='td_$programInstance.id'>
-									<a><span id='infor_$programInstance.id'>$programInstance.program.displayName ($format.formatDate($programInstance.enrollmentDate))</span></a>
-									<img id='followup_$programInstance.id' src='images/risk_small.png' #if($programInstance.followup=='true') #else class='hidden' #end >
-								</td>
-							</tr>
-							#if($programInstance.program.type==1 && $programStageInstance)
+						<tr id='tr1_$programInstance.id' type='$programInstance.program.type'
+						programStageInstanceId='$programStageInstance.id' 
+						relationshipText='$!programInstance.program.relationshipText'
+						relationshipType='$!programInstance.program.relationshipType.id'
+						relationshipSide='$!programInstance.program.relationshipSide'
+						relatedProgram='$!programInstance.program.relatedProgram.id'
+						programId='$programInstance.program.id'
+						style='cursor:pointer;'
+						onclick='javascript:setFieldValue("programIdAddPatient",$programInstance.program.id);loadActiveProgramStageRecords("$programInstance.id", "$programStageInstance.id")' >
+							<td id='td_$programInstance.id'>
+								<a><span id='infor_$programInstance.id'>$programInstance.program.displayName ($format.formatDate($programInstance.enrollmentDate))</span></a>
+								<img id='followup_$programInstance.id' src='images/risk_small.png' #if($programInstance.followup=='true') #else class='hidden' #end >
+							</td>
+						</tr>
+						#if($programInstance.program.type==1 && $programStageInstance)
 							<tr>
 								<td id='tr2_$programInstance.id' 
 									onclick='javascript:loadActiveProgramStageRecords("$programInstance.id", "$programStageInstance.id")'
@@ -149,7 +161,7 @@
 									<a>&#8226; $programStageInstance.programStage.displayName ($format.formatDate($programStageInstance.dueDate))</a>
 								</td>
 							</tr>
-							#end
+						#end
 					#else
 					<tr id='tr1_$programInstance.id' type='$programInstance.program.type'
 						programStageInstanceId='$programStageInstance.id' style='cursor:pointer;'

=== 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-23 09:00:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm	2013-09-23 09:42:21 +0000
@@ -198,7 +198,6 @@
 							<th>$i18n.getString( "allow_provided_elsewhere" )</th>
 							<th>$i18n.getString( "display_in_reports" )</th>
 							<th>$i18n.getString( "date_in_future" )</th>
-							<th>$i18n.getString( "display_as_radio_button" )</th>
 					</thead>
 					<tbody id="selectedList"></tbody>
 				</table>