← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7025: (patient) Consistent use of checkbox for yes/no.

 

------------------------------------------------------------
revno: 7025
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-05-24 10:51:44 +0700
message:
  (patient) Consistent use of checkbox for yes/no.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.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/patientidentifiertype/AddPatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java	2012-03-26 06:36:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java	2012-05-24 03:51:44 +0000
@@ -126,8 +126,13 @@
         PatientIdentifierType identifierType = new PatientIdentifierType();
         identifierType.setName( name );
         identifierType.setDescription( description );
-        identifierType.setRelated( related.booleanValue() );
-        identifierType.setMandatory( mandatory.booleanValue() );
+        
+        related = (related == null) ? false : true;
+        identifierType.setRelated( related );
+        
+        mandatory = (mandatory == null) ? false : true;
+        identifierType.setMandatory( mandatory );
+        
         identifierType.setNoChars( noChars );
         identifierType.setType( type );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java	2012-03-26 06:36:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java	2012-05-24 03:51:44 +0000
@@ -135,8 +135,13 @@
         {
             identifierType.setName( name );
             identifierType.setDescription( description );
-            identifierType.setMandatory( mandatory.booleanValue() );
-            identifierType.setRelated( related.booleanValue() );
+            
+            related = (related == null) ? false : true;
+            identifierType.setRelated( related );
+            
+            mandatory = (mandatory == null) ? false : true;
+            identifierType.setMandatory( mandatory );
+            
             identifierType.setNoChars( noChars );
             identifierType.setType( type );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm	2012-05-24 03:10:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm	2012-05-24 03:51:44 +0000
@@ -22,7 +22,7 @@
     </tr>
     
     <tr>
-		<td><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><label for="mandatory">$i18n.getString( "mandatory" )</label></td>
 		<td>
 			<input type='checkbox' id="mandatory" name="mandatory" value='true'>
 		</td>		
@@ -30,7 +30,7 @@
 	</tr>
     
     <tr>
-    	<td><label for="inheritable">$i18n.getString( "inheritable" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+    	<td><label for="inheritable">$i18n.getString( "inheritable" )</label></td>
 		<td>
 			<input type='checkbox' id="inheritable" name="inheritable" value='true'>
 		</td>		

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm	2012-03-27 01:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm	2012-05-24 03:51:44 +0000
@@ -25,23 +25,17 @@
 		</tr>	
 		
 		<tr>
-			<td><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+			<td><label for="mandatory">$i18n.getString( "mandatory" )</label></td>
 			<td>
-				<select id="mandatory" name="mandatory" class="{validate:{required:true}}">
-					<option value="true">$i18n.getString( "yes" )</option>
-					<option value="false" selected="selected">$i18n.getString( "no" )</option>
-				</select>
+				<input type='checkbox' id="mandatory" name="mandatory" value='true' >
 			</td>
 			<td></td>
 		</tr>
 		
 		<tr>
-			<td><label for="related">$i18n.getString( "related" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+			<td><label for="related">$i18n.getString( "related" )</label></td>
 			<td>
-				<select id="related" name="related" class="{validate:{required:true}}">
-					<option value="true" >$i18n.getString( "yes" )</option>
-					<option value="false" selected="selected">$i18n.getString( "no" )</option>
-				</select>
+				<input type='checkbox' id="related" name="related" value='true' >
 			</td>
 			<td></td>
 		</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm	2012-05-24 03:10:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm	2012-05-24 03:51:44 +0000
@@ -25,7 +25,7 @@
       </tr>
       
       <tr>
-		<td><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+		<td><label for="mandatory">$i18n.getString( "mandatory" )</label></td>
 		<td>
 			<input type='checkbox' id="mandatory" name="mandatory" value='true' #if( $patientAttribute.mandatory ) checked #end>
 		</td>		
@@ -33,7 +33,7 @@
 	</tr>
 	
 	<tr>
-		<td><label for="inheritable">$i18n.getString( "inheritable" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+		<td><label for="inheritable">$i18n.getString( "inheritable" )</label></td>
 		<td>
 			<input type='checkbox' id="inheritable" name="inheritable" value='true' #if( $patientAttribute.inheritable) checked #end>		
 		</td>		

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2012-03-27 01:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2012-05-24 03:51:44 +0000
@@ -25,23 +25,17 @@
 		</tr>	
 		
 		<tr>
-			<td><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+			<td><label for="mandatory">$i18n.getString( "mandatory" )</label></td>
 			<td>
-				<select id="mandatory" name="mandatory">
-					<option value="true" #if( $patientIdentifierType.mandatory ) selected="selected" #end>$i18n.getString( "yes" )</option>
-					<option value="false" #if( !$patientIdentifierType.mandatory ) selected="selected" #end>$i18n.getString( "no" )</option>
-				</select>
+				<input type='checkbox' id="mandatory" name="mandatory" #if( $patientIdentifierType.mandatory ) checked #end >
 			</td>		
 			<td></td>				
 		</tr>
 		
 		<tr>
-			<td><label for="related">$i18n.getString( "related" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+			<td><label for="related">$i18n.getString( "related" )</label></td>
 			<td>
-				<select id="related" name="related" class="{validate:{required:true}}">
-					<option value="true" #if( $patientIdentifierType.related ) selected="selected" #end>$i18n.getString( "yes" )</option>
-					<option value="false" #if( !$patientIdentifierType.related ) selected="selected" #end>$i18n.getString( "no" )</option>
-				</select>
+				<input type='checkbox' name="related" #if( $patientIdentifierType.related ) checked #end >
 			</td>		
 			<td></td>				
 		</tr>