← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10701: Minor fix for default person registation form.

 

------------------------------------------------------------
revno: 10701
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-04-26 22:24:15 +0700
message:
  Minor fix for default person registation form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.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/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java	2013-04-10 03:13:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java	2013-04-26 15:24:15 +0000
@@ -222,7 +222,7 @@
             Collections.sort( attributeGroups, new PatientAttributeGroupSortOrderComparator() );
             for ( PatientAttributeGroup attributeGroup : attributeGroups )
             {
-                List<PatientAttribute> attributes = attributeGroupService.getPatientAttributes( attributeGroup );
+                List<PatientAttribute> attributes = attributeGroup.getAttributes();
                 attributes.removeAll( patientAttributesInProgram );
 
                 if ( attributes.size() > 0 )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java	2013-03-07 05:59:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java	2013-04-26 15:24:15 +0000
@@ -240,7 +240,7 @@
             Collections.sort( attributeGroups, new PatientAttributeGroupSortOrderComparator() );
             for ( PatientAttributeGroup attributeGroup : attributeGroups )
             {
-                List<PatientAttribute> attributes = attributeGroupService.getPatientAttributes( attributeGroup );
+                List<PatientAttribute> attributes = attributeGroup.getAttributes();
                 attributes.removeAll( patientAttributesInProgram );
 
                 if ( attributes.size() > 0 )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-04-24 07:41:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-04-26 15:24:15 +0000
@@ -142,9 +142,11 @@
 	<!-- ATTRIBUTES IN GROUPS -->
 	
 	#foreach ($attributeGroup in $attributeGroups )
-		<tr><td>&nbsp;</td></tr>
-		<tr><th colspan="2" class="heading-column">$attributeGroup.displayName</th></tr>
 		#set($attributes = $attributeGroupsMap.get($attributeGroup.id))
+		#if($!attributes || $attributes.size() > 0)
+			<tr><td>&nbsp;</td></tr>
+			<tr><th colspan="2" class="heading-column">$attributeGroup.displayName</th></tr>
+		#end
 		#foreach($attribute in $attributes )
 			#if( $attribute )
 				#set($value = "")
@@ -185,8 +187,10 @@
 
 	<!-- ATTRIBUTES NOT IN GROUPS -->
 
-	#if ( $noGroupAttributes && $noGroupAttributes.size() > 0) 	
+	#if ( $noGroupAttributes && $noGroupAttributes.size() > 0) 
+		#if($!noGroupAttributes || $noGroupAttributes.size() > 0)
 		<tr><th colspan="2" class="heading-column">$i18n.getString( "other_details" )</th></tr>
+		#end
 		#foreach($attribute in $noGroupAttributes )
 		#if( $!attribute && $attribute.program )
 		#elseif( $!attribute )