← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1145: Bug fix for unicode encoding

 

------------------------------------------------------------
revno: 1145
committer: abyot <abyota@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2009-12-01 10:17:05 +0100
message:
  Bug fix for unicode encoding
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentAction.java	2009-11-25 08:30:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ProgramEnrollmentAction.java	2009-12-01 09:17:05 +0000
@@ -37,6 +37,7 @@
 import org.hisp.dhis.program.ProgramService;
 import org.hisp.dhis.program.ProgramStageInstance;
 
+
 import com.opensymphony.xwork2.Action;
 
 /**

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm	2009-12-01 08:47:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm	2009-12-01 09:17:05 +0000
@@ -1,7 +1,7 @@
 
 <h3>$i18n.getString( "add_new_patient" )</h3>
 																					
-<form id="addPatientForm" action="addPatient.action" method="post" onsubmit="return validateAddPatient()">
+<form id="addPatientForm" action="addPatient.action" method="post">
 
 <table>	
 	<tr>
@@ -51,14 +51,14 @@
 			<input type="text" id="age" name="age" style="width:4em">
 			&nbsp;&nbsp;&nbsp;
 			<label for="estimated">$i18n.getString( "estimated" )</label>
-            <input type="checkbox" " id="birthDateEstimated" name="birthDateEstimated"> 
+            <input type="checkbox" id="birthDateEstimated" name="birthDateEstimated" value="true"> 
 	   </td>
 	</tr>
 	  	
 </table>
 
 <p>
-	<input type="submit" value="$i18n.getString( "add" )" style="width:10em">
+	<input type="button" onclick="validateAddPatient()" value="$i18n.getString( "add" )" style="width:10em">
 	<input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='patient.action'" style="width:10em">
 </p>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2009-11-14 14:29:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2009-12-01 09:17:05 +0000
@@ -300,15 +300,7 @@
     
     if ( type == 'success' )
     {
-    	window.location.href='addPatient.action?' +			
-			'identifier=' + getFieldValue( 'identifier' ) +
-			'&firstName=' + getFieldValue( 'firstName' ) +
-			'&middleName=' + getFieldValue( 'middleName' ) +
-			'&lastName=' + getFieldValue( 'lastName' ) +
-			'&gender=' + getFieldValue( 'gender' ) +
-			'&birthDate=' + getFieldValue( 'birthDate' ) +
-			'&age=' + getFieldValue( 'age' ) +
-			'&birthDateEstimated=' + document.getElementById( 'birthDateEstimated' ).checked ;       
+    	document.getElementById('addPatientForm').submit();
     }
     else if ( type == 'error' )
     {
@@ -352,17 +344,8 @@
     
     if ( type == 'success' )
     {
-    	window.location.href='updatePatient.action?' + 
-    		'id=' + getFieldValue( 'id' ) +    		
-    		'&firstName=' + getFieldValue( 'firstName' ) +
-    		'&middleName=' + getFieldValue( 'middleName' ) +
-    		'&lastName=' + getFieldValue( 'lastName' ) +
-    		'&gender=' + getFieldValue( 'gender' ) +
-    		'&birthDate=' + getFieldValue( 'birthDate' ) +
-    		'&birthDateEstimated=' + document.getElementById( 'birthDateEstimated' ).checked ;   		
-    	
-    	//var form = document.getElementById( 'updatePatientForm' ) + document.getElementById( 'birthDateEstimated' ).checked;        
-        //form.submit();
+    	var form = document.getElementById( 'updatePatientForm' );        
+        form.submit();
     }
     else if ( type == 'error' )
     {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm	2009-11-14 14:29:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm	2009-12-01 09:17:05 +0000
@@ -1,7 +1,7 @@
 
 <h3>$i18n.getString( "update_patient" )</h3>
 
-<form id="updatePatientForm" action="updatePatient.action" method="post" onsubmit="return validateUpdatePatient()">
+<form id="updatePatientForm" action="updatePatient.action" method="post">
 <div>
 	<input type="hidden" id="id" name="id" value="$patient.id">
 </div>
@@ -50,7 +50,7 @@
 		    <img src="../images/calendar_icon.gif" width="16" height="16" id="getBirthDate" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "date_of_birth" )">		    
             &nbsp;&nbsp;&nbsp;
             <label for="estimated">$i18n.getString( "estimated" )</label>
-            <input type="checkbox" " id="birthDateEstimated" name="birthDateEstimated" #if( $patient.birthDateEstimated ) checked="checked" #end>
+            <input type="checkbox" id="birthDateEstimated" name="birthDateEstimated" value="true" #if( $patient.birthDateEstimated ) checked="checked" #end>
             &nbsp;
             <label for="age">$i18n.getString( "age" )</label>&nbsp;&nbsp;$encoder.htmlEncode( $patient.getAge() )            
         </td> 
@@ -59,7 +59,7 @@
 </table>
 
 <p>
-	<input type="submit" value="$i18n.getString( "update" )" style="width:10em">
+	<input type="button" value="$i18n.getString( "update" )" onclick="validateUpdatePatient()" style="width:10em">
 	<input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='searchPatient.action'" style="width:10em">
 </p>