← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7707: Minor fix for Person Enrollment form.

 

------------------------------------------------------------
revno: 7707
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 10:35:55 +0700
message:
  Minor fix for Person Enrollment form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.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/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2012-07-21 14:59:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2012-07-26 03:35:55 +0000
@@ -1,3 +1,6 @@
+#set($noIden = $identifierTypes.size() )
+#set($noOtherGroup = $noGroupAttributes.size() )
+#set($noGroup = $attributeGroups.size() )
 #if( $programInstance || $hasDataEntry=='true')
 <input type='hidden' id='programInstanceId' name='programInstanceId' value='$programInstance.id' />
 <div id="tabs">
@@ -16,12 +19,12 @@
 	<!-- Enroll program TAB -->
 	<div id="tab-2">
 		<form id='programEnrollmentInforForm' name='programEnrollmentInforForm' action='#' method="POST" >
-			#if( $identifierTypes.size() > 0 || $noGroupAttributes.size() > 0 || $attributeGroups.size() > 0 )
+			#if( $noIden > 0 || $noOtherGroup > 0 || $noGroup > 0 )
 				<input type='hidden' id='programId' name='programId' value='$programInstance.program.id'>
 				<input type='hidden' id='patientId' name='patientId' value='$programInstance.patient.id'>
 				<!-- IDENTIFIERS -->
 				<table id='enrollmentInforDiv' name='enrollmentInforDiv' class='mainPageTable' >
-					#if( $identifierTypes.size() > 0 )
+					#if( $noIden > 0 )
 					<tr>
 						<th colspan='2'>$i18n.getString( "identifier" )</th> 
 					</tr>
@@ -83,7 +86,7 @@
 
 				<!-- ATTRIBUTES NOT IN GROUPS -->
 
-				#if ( $noGroupAttributes && $noGroupAttributes.size() > 0) 	
+				#if ( $noGroupAttributes && $noOtherGroup > 0) 	
 					<tr><th colspan="2" class="heading-column">$i18n.getString( "Other details" )</th></tr>
 					#set( $mark = false )
 					#foreach($attribute in $noGroupAttributes )
@@ -195,7 +198,7 @@
 			$("#tabs").tabs("remove", 2);
 		#end
 		
-		#if( $identifierTypes.size() > 0 || $noGroupAttributes.size() > 0 || $attributeGroups.size() > 0 )
+		#if( $noIden > 0 || $noOtherGroup > 0 || $noGroup > 0 )
 			$( "#tabs" ).tabs( "option", "selected", 1 );
 		#else
 			$( "#tabs" ).tabs( "option", "selected", 2 );