dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23122
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11242: Fix bug - Don't save identifier and attribute values in custom person registration form.
------------------------------------------------------------
revno: 11242
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-06-20 16:05:11 +0700
message:
Fix bug - Don't save identifier and attribute values in custom person registration form.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java 2013-06-20 08:49:00 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java 2013-06-20 09:05:11 +0000
@@ -201,6 +201,7 @@
}
else
{
+ int id = identifierType.getId();
// Get value
String value = "";
if ( patient != null )
@@ -214,7 +215,7 @@
}
}
- inputHtml = "<input id=\"iden" + uid + "\" name=\"iden" + uid + "\" tabindex=\"" + index
+ inputHtml = "<input id=\"iden" + id + "\" name=\"iden" + id + "\" tabindex=\"" + index
+ "\" value=\"" + value + "\" ";
inputHtml += "class=\"{validate:{required:" + identifierType.isMandatory() + ",";
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2013-06-11 05:55:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2013-06-20 09:05:11 +0000
@@ -104,27 +104,18 @@
#end
#set($value="")
- #foreach( $identifierType in $identifierTypes)
- #foreach( $identifier in $patient.identifiers)
- #if($identifier.identifierType.id==$identifierType.id)
- #set($value=$identifier.identifier)
- #end
- #if($!identifier.identifierType)
- #else
- #set($systemId=$identifier.identifier)
- #end
+ #foreach( $identifier in $patient.identifiers)
+ #if($!identifier.identifierType)
+ #set($value=$identifier.identifier)
+ #else
+ #set($systemId=$identifier.identifier)
#end
#end
#if($value=="")
#set($value=$!patient.getFullName())
#end
#if($value=="")
- #foreach( $identifier in $patient.identifiers)
- #if($!identifier.identifierType)
- #else
- #set($value=$identifier.identifier)
- #end
- #end
+ #set($value=$systemId)
#end
<td style="cursor:pointer;" onclick="javascript:isDashboard=true;showPatientDashboardForm( '$patient.id' )">
<a>$encoder.htmlEncode($value)</a>