← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20012: misc fixes for type => valueType

 

------------------------------------------------------------
revno: 20012
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-07 10:19:10 +0700
message:
  misc fixes for type => valueType
modified:
  dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm
  dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/programStageForm.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.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-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm	2014-01-23 14:09:55 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm	2015-09-07 03:19:10 +0000
@@ -75,25 +75,25 @@
                     <br /><span style="color: #990000;">$typeViolation</span>
                 #end
 
-				#if( $dataElement.type == "string" )
+				#if( $dataElement.valueType.isText() )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "bool" )
+				#elseif( $dataElement.valueType == "BOOLEAN" )
 					<select name="$key" style="width: 100%;">
 						<option value="">[ No Value ]</option>
 						<option value="true" #if($!dataValues.get($key) == "true")selected="selected"#end>Yes</option>
 						<option value="false" #if($!dataValues.get($key) == "false")selected="selected"#end>No</option>
 					</select>
-				#elseif( $dataElement.type == "date" )
+				#elseif( $dataElement.valueType == "DATE" )
 					<input type="date" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "number" )
-					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "int" )
-					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "posInt" )
-					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "zeroPositiveInt" )
-					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "negInt" )
+				#elseif( $dataElement.valueType == "NUMBER" && $dataElement.numberType == "number" )
+					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
+				#elseif( $dataElement.valueType == "INTEGER" && $dataElement.numberType == "int" )
+					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
+				#elseif( $dataElement.valueType == "INTEGER_POSITIVE" && $dataElement.numberType == "posInt" )
+					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
+				#elseif( $dataElement.valueType == "INTEGER_NEGATIVE" && $dataElement.numberType == "negInt" )
+					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
+				#elseif( $dataElement.valueType == "INTEGER_ZERO_OR_POSITIVE" && $dataElement.numberType == "zeroPositiveInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#end
 				#end

=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/programStageForm.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/programStageForm.vm	2012-06-18 06:14:19 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/programStageForm.vm	2015-09-07 03:19:10 +0000
@@ -33,21 +33,21 @@
 					#set( $key = "DE${dataElement.id}OC${categoryOptionCombo.id}" )
 
 					<label>$encoder.htmlEncode( $dataElementName ) #if( $categoryOptionCombo.name!="(default)")$encoder.htmlEncode( $categoryOptionCombo.name )#end 
-					#if($dataElement.type=="date") [yyyy-MM-dd] #end
+					#if($dataElement.valueType == "DATE") [yyyy-MM-dd] #end
 					</label>
 					
 					#if( $typeViolations.get( $key ) )
-                		#set( $typeViolation = $typeViolations.get( $key ) )
-            			<br /><span style="color: #990000;">$prevDataValues.get($key) $i18n.getString($typeViolation)</span>
-            		#end
+						#set( $typeViolation = $typeViolations.get( $key ) )
+						<br /><span style="color: #990000;">$prevDataValues.get($key) $i18n.getString($typeViolation)</span>
+					#end
 					
 					<input type=
-					#if($dataElement.type=="string") 
+					#if( $dataElement.valueType.isText() )
 						"text"
-					#elseif ($dataElement.type=="int" ) 
+					#elseif ($dataElement.valueType.isInteger() )
 						"text" 
 					#else 
-						"$dataElement.type" 
+						"$dataElement.valueType"
 					#end 
 					name="$key" value="$!prevDataValues.get($key)" />
 				
@@ -64,12 +64,12 @@
                 	#end
                 
 					<select type=
-					#if($dataElement.type=="string") 
+					#if( $dataElement.valueType.isText() )
 						"text"
-					#elseif($dataElement.type=="int" ) 
+					#elseif($dataElement.valueType.isInteger() )
 						"text"
 					#else 
-						"$dataElement.type"
+						"$dataElement.valueType"
 					#end 
 					name="$key" />
 				

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm	2014-06-26 09:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm	2015-09-07 03:19:10 +0000
@@ -8,7 +8,7 @@
 		<alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
 		<code>$!encoder.xmlEncode( $dataElement.code )</code>
 		<description>$!encoder.xmlEncode( $dataElement.description )</description>
-		<type>$dataElement.type</type>
+		<valueType>$dataElement.valueType</valueType>
 	</dataElement>
 #end
 </dataElements>
\ No newline at end of file