=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java 2012-07-11 09:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/beneficiaryregistration/action/RegisterBeneficiaryAction.java 2012-07-15 07:10:03 +0000
@@ -27,13 +27,15 @@
package org.hisp.dhis.light.beneficiaryregistration.action;
-import java.util.Collection;
+import com.opensymphony.xwork2.Action;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientIdentifierTypeService;
+import org.hisp.dhis.program.Program;
+import org.hisp.dhis.program.ProgramService;
-import com.opensymphony.xwork2.Action;
+import java.util.Collection;
public class RegisterBeneficiaryAction
implements Action
@@ -66,6 +68,13 @@
this.patientAttributeService = patientAttributeService;
}
+ private ProgramService programService;
+
+ public void setProgramService( ProgramService programService )
+ {
+ this.programService = programService;
+ }
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -106,13 +115,17 @@
this.patientAttributes = patientAttributes;
}
+ // -------------------------------------------------------------------------
+ // Action Implementation
+ // -------------------------------------------------------------------------
+
@Override
public String execute()
throws Exception
{
patientIdentifierTypes = patientIdentifierTypeService.getAllPatientIdentifierTypes();
patientAttributes = patientAttributeService.getAllPatientAttributes();
+
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-07-13 09:18:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-07-15 07:10:03 +0000
@@ -1,7 +1,7 @@
-
-
+
-
-
-
+
+
+
@@ -171,11 +171,11 @@
-
-
-
-
+
+
+
+
@@ -183,73 +183,73 @@
id="org.hisp.dhis.light.namebaseddataentry.action.GetBeneficiaryDetailAction"
class="org.hisp.dhis.light.namebaseddataentry.action.GetBeneficiaryDetailAction">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -263,9 +263,10 @@
-
+ scope="prototype">
+
+
-
-
-
+
+
+
@@ -362,17 +363,17 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -443,29 +444,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-07-13 09:18:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-07-15 07:10:03 +0000
@@ -68,6 +68,8 @@
search=Search
enrolled_programs=Enrolled Program(s)
other_programs=Other Programs
+available_programs=Available Programs
+no_enrolled_programs=No Enrolled Programs
enroll=Enroll
enrollment_date=Enrollment Date
incident_date=Incident Date
@@ -87,6 +89,7 @@
please_select=Please Select
enroll_in_program=Enroll In Program
relationships=Relationships
+no_relationships=No Relationships
phone_number=Phone Number
add_relationships=Add Relationships
related_person_search=Related Person Search
@@ -97,4 +100,4 @@
approximated=Approximated
declared=Declared
verified=Verified
-anomynous_program_list=Anomynous Program List
\ No newline at end of file
+anomynous_program_list=Anonymous Program List
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-07-12 10:33:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-07-15 07:10:03 +0000
@@ -221,7 +221,7 @@
- /light/selectEnrollmentProgram.action?patientId=${patientId}
+ /light/showPatientProgramList.action?patientId=${patientId}
/dhis-web-light/main.vm
/dhis-web-light/registration/beneficiaryRegistrationForm.vm
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm 2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/enrollment/enrollmentProgramList.vm 2012-07-15 07:10:03 +0000
@@ -8,13 +8,17 @@
#end
-#foreach( $program in $enrolledProgramList )
- - $program.getName()
+#if( $enrolledProgramList.size() > 0)
+ #foreach( $program in $enrolledProgramList )
+ - $program.getName()
+ #end
+#else
+ - $i18n.getString( "no_enrolled_programs" )
#end
-$i18n.getString( "other_programs" )
+$i18n.getString( "available_programs" )
#foreach( $program in $programList )
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2012-07-11 09:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2012-07-15 07:10:03 +0000
@@ -8,19 +8,23 @@
#end
@@ -56,9 +60,13 @@
$i18n.getString("relationships")
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2012-07-13 09:18:09 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/registration/beneficiaryRegistrationForm.vm 2012-07-15 07:10:03 +0000
@@ -104,8 +104,6 @@
#end
#end
#end
-
-