dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23725
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11547: Fix bug - Error when to display phone number in Register new patient for relationship form.
------------------------------------------------------------
revno: 11547
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-08-01 10:15:38 +0700
message:
Fix bug - Error when to display phone number in Register new patient for relationship form.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm
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/selectPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.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/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2013-07-09 03:26:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2013-08-01 03:15:38 +0000
@@ -37,6 +37,8 @@
#end
addEventForPatientForm( 'patientForm' );
});
+
+ addRelationship = false;
hideById('patientForm [id=age]');
hideById('mainLinkLbl');
</script>
@@ -49,6 +51,7 @@
<form id="patientForm" name="patientForm" method="post" >
<input type="hidden" id="representativeId" name="representativeId"/>
<input type="hidden" id="relationshipTypeId" name="relationshipTypeId"/>
+<input type="hidden" id="addRelationship" name="addRelationship" value="true">
<table>
#parse( "/dhis-web-caseentry/patientForm.vm" )
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm 2013-07-31 06:51:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm 2013-08-01 03:15:38 +0000
@@ -1,6 +1,7 @@
<script>
jQuery('#patientForm').ready( function(){
+ addRelationship = true;
checkedDuplicate = false;
jQuery("#patientForm").validate({
=== 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-07-31 06:51:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-08-01 03:15:38 +0000
@@ -276,21 +276,22 @@
showById('birthDate');
#end
- var phoneNumbers = "";
#if( $!patient.phoneNumber )
- phoneNumbers = '$!encoder.jsEscape( $patient.phoneNumber , "'" )';
- setFieldValue('phoneNumber',phoneNumbers[0]);
- #if($!customRegistrationForm)
- for( var i = 1;i<phoneNumbers.length;i++ )
- {
- addCustomPhoneNumberField(phoneNumbers[i]);
- }
- #elseif( $!patient.phoneNumber && $patient.phoneNumber!="")
- for( var i = 1;i<phoneNumbers.length;i++ )
- {
- addPhoneNumberField(phoneNumbers[i]);
- }
- #end
+ if(!addRelationship){
+ var phoneNumbers = '$!encoder.jsEscape( $patient.phoneNumber , "'" )'.split(";");
+ setFieldValue('phoneNumber',phoneNumbers[0]);
+ #if($!customRegistrationForm)
+ for( var i = 1;i<phoneNumbers.length;i++ )
+ {
+ addCustomPhoneNumberField(phoneNumbers[i]);
+ }
+ #elseif( $!patient.phoneNumber && $patient.phoneNumber!="")
+ for( var i = 1;i<phoneNumbers.length;i++ )
+ {
+ addPhoneNumberField(phoneNumbers[i]);
+ }
+ #end
+ }
#else
setFieldValue('phoneNumber',phoneNumberAreaCode)
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2013-04-10 04:35:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2013-08-01 03:15:38 +0000
@@ -109,6 +109,7 @@
isAjax = true;
contentDiv = '';
registration = true;
+ var addRelationship = false;
// ----------------------------------------------------------------
// Search field
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm 2013-06-20 09:09:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm 2013-08-01 03:15:38 +0000
@@ -54,6 +54,8 @@
jQuery('#patientForm [id=age]').css("display","none");
}
});
+
+ addRelationship = false;
hideById('registrationDateTR');
hideById('mainLinkLbl');
jQuery('[name=mainPagelink]').html(i18n_main_form_link);