← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 20013
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-07 10:33:01 +0700
message:
  misc fixes for type => valueType
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageDataElements.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.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/defaultDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm	2014-10-17 03:31:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm	2015-09-07 03:33:01 +0000
@@ -40,7 +40,7 @@
 				#end        
 			</span>
 			##type        
-			<span id="value[$programStageDataElement.dataElement.id].type" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.type )</span></td>       
+			<span id="value[$programStageDataElement.dataElement.id].valueType" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.valueType )</span></td>
 		</td>        
 		##entry        
 		<td class='input-column'>   
@@ -50,17 +50,17 @@
 			#else
 				#set( $hasOptionSet = 'false')
 			#end
-			#if( $programStageDataElement.dataElement.textType == "longText" )
+			#if( $programStageDataElement.dataElement.valueType == "LONG_TEXT" )
 				<textarea name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" onchange="saveVal( '$programStageDataElement.dataElement.uid', this.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" maxlength=255 >$!encoder.htmlEncode( $dataValue.value )</textarea>
-			#elseif( $programStageDataElement.dataElement.type == "bool" )
+			#elseif( $programStageDataElement.dataElement.valueType == "BOOLEAN" )
 				<select name="entryfield" data="{compulsory: $programStageDataElement.compulsory }" id="$id" onchange="saveOpt( '$programStageDataElement.dataElement.uid' )" tabindex="$tabIndex">
 					<option value="">[$i18n.getString( "select_value" )]</option>
 					<option value="true" #if( $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
 					<option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
 				</select>
-			#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
+			#elseif( $programStageDataElement.dataElement.valueType == "TRUE_ONLY" )
 				<input name="entryfield" type="checkbox" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()'}" id="$id" name="entryfield" #if($dataValue.value=="true") checked #end onchange="saveVal( '$programStageDataElement.dataElement.uid', this.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
-			#elseif( $programStageDataElement.dataElement.type == "date" )
+			#elseif( $programStageDataElement.dataElement.valueType == "DATE" )
 				<input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()' }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $dataValue.value )" onchange="saveVal( '$programStageDataElement.dataElement.uid', this.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="date-field datefield" />
 				<script type="text/javascript">
 					#if($programStageDataElement.allowFutureDate=='true')
@@ -98,7 +98,7 @@
 					</table>
 				#else
 					<input options='$hasOptionSet' optionset='$programStageDataElement.dataElement.optionSet.uid' id='$id' name="entryfield" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />				#end
-			#elseif($programStageDataElement.dataElement.type=='username')
+			#elseif($programStageDataElement.dataElement.valueType=='USERNAME')
 				<input name="entryfield" username='true' class="auto-field optionset" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" />
 			#else
 				<input name="entryfield"  

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageDataElements.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageDataElements.vm	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageDataElements.vm	2015-09-07 03:33:01 +0000
@@ -9,7 +9,7 @@
 		#if( $!programStageDataElement.dataElement.optionSet )
 			"optionset",
 		#else
-			"${programStageDataElement.dataElement.type}",
+			"${programStageDataElement.dataElement.valueType}",
 		#end
 	"compulsory": "${programStageDataElement.compulsory}",
 	"displayInReports": "${programStageDataElement.displayInReports}"

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm	2015-09-07 03:33:01 +0000
@@ -48,13 +48,13 @@
 	           
 	        ##value        
 	        <td>        
-	            #if( $dataValue.dataElement.type == "bool" )
+	            #if( $dataValue.dataElement.valueType == "BOOLEAN" )
 	                #if( $dataValue.value == "true" )
 	                    $i18n.getString( "yes" ) 
 	                #elseif( $dataValue.value == "false" )
 	                    $i18n.getString( "no" )
-	                #end                                              
-	            #elseif( $dataValue.dataElement.type == "string"  && $dataValue.dataElement.isMultiDimensional() )                    
+	                #end
+	            #elseif( $dataValue.dataElement.valueType.isText() && $dataValue.dataElement.isMultiDimensional() )
 	                #if( $dataValue.value )                       
 	                    #set( $optionValue = $optionValueMap.get( $dataValue.dataElement.id ) )
 	                    $encoder.htmlEncode( $optionValue )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm	2014-10-17 03:31:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm	2015-09-07 03:33:01 +0000
@@ -51,7 +51,7 @@
 									#end        
 								</span>
 								##type        
-								<span id="value[$programStageDataElement.dataElement.id].type" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.type )</span></td>       
+								<span id="value[$programStageDataElement.dataElement.id].valueType" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.valueType )</span></td>
 							</td>        
 							##entry        
 							<td class='input-column'>   
@@ -61,17 +61,17 @@
 								#else
 									#set( $hasOptionSet = 'false')
 								#end
-								#if( $programStageDataElement.dataElement.textType == "longText" )
+								#if( $programStageDataElement.dataElement.valueType == "LONG_TEXT" )
 									<textarea name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" onchange="saveVal( '$programStageDataElement.dataElement.uid', this.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" maxlength=255 >$!encoder.htmlEncode( $dataValue.value )</textarea>
-								#elseif( $programStageDataElement.dataElement.type == "bool" )
+								#elseif( $programStageDataElement.dataElement.valueType == "BOOLEAN" )
 									<select name="entryfield" data="{compulsory: $programStageDataElement.compulsory }" id="$id" onchange="saveOpt( '$programStageDataElement.dataElement.uid' )" tabindex="$tabIndex">
 										<option value="">[$i18n.getString( "select_value" )]</option>
 										<option value="true" #if( $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
 										<option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
 									</select>
-								#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
+								#elseif( $programStageDataElement.dataElement.valueType == "TRUE_ONLY" )
 									<input name="entryfield" type="checkbox" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()'}" id="$id" name="entryfield" #if($dataValue.value=="true") checked #end onchange="saveVal( '$programStageDataElement.dataElement.uid', this.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
-								#elseif( $programStageDataElement.dataElement.type == "date" )
+								#elseif( $programStageDataElement.dataElement.valueType == "DATE" )
 									<input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()'}" id="$id" name="entryfield" value="$!encoder.htmlEncode( $dataValue.value )" onchange="saveVal( '$programStageDataElement.dataElement.uid', this.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="date-field datefield" >
 									<script type="text/javascript">
 										#if($programStageDataElement.allowFutureDate=='true')
@@ -110,7 +110,7 @@
 									#else
 										<input id='$id' name="entryfield" options='$hasOptionSet' optionset="$programStageDataElement.dataElement.optionSet.uid" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
 									#end
-								#elseif($programStageDataElement.dataElement.type=='username')
+								#elseif($programStageDataElement.dataElement.valueType=='USERNAME')
 									<input id='$id' name="entryfield" options='$hasOptionSet' optionset="$programStageDataElement.dataElement.optionSet.uid" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
 								#else
 									<input name="entryfield" 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm	2014-10-17 03:31:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm	2015-09-07 03:33:01 +0000
@@ -73,7 +73,7 @@
 												#end        
 											</span>
 											##type        
-											<span id="value[$programStageDataElement.dataElement.id].type" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.type )</span></td>       
+											<span id="value[$programStageDataElement.dataElement.id].valueType" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.valueType )</span></td>
 										</td>        
 										##entry        
 										<td class='input-column'>   
@@ -105,17 +105,17 @@
 												#set($validate=$validate + "required:true")
 											#end
 												
-											#if( $programStageDataElement.dataElement.textType == "longText" )
+											#if( $programStageDataElement.dataElement.valueType == "LONG_TEXT" )
 												<textarea name="entryfield" type="text" id="$id" maxlength=255 class="{validate:{$validate}}" >$!encoder.htmlEncode( $dataValue.value )</textarea>
-											#elseif( $programStageDataElement.dataElement.type == "bool" )
+											#elseif( $programStageDataElement.dataElement.valueType == "BOOLEAN" )
 												<select name="entryfield" id="$id" class="{validate:{$validate}}" >
 													<option value="">[$i18n.getString( "select_value" )]</option>
 													<option value="true" #if( $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
 													<option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
 												</select>
-											#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
+											#elseif( $programStageDataElement.dataElement.valueType == "TRUE_ONLY" )
 												<input name="entryfield" type="checkbox" id="$id" class="{validate:{$validate}}" >
-											#elseif( $programStageDataElement.dataElement.type == "date" )
+											#elseif( $programStageDataElement.dataElement.valueType == "DATE" )
 												<input name="entryfield" class='datefield' type="text" id="$id" name="entryfield" value="$!encoder.htmlEncode( $dataValue.value )" class="{validate:{$validate}}">
 												<script type="text/javascript">
 													datePicker( '$programStageDataElement.programStage.uid' + '-' + '$programStageDataElement.dataElement.uid' + '-val', false, false);
@@ -149,7 +149,7 @@
 												#else
 													<input optionset='$programStageDataElement.dataElement.optionSet.uid' id='$id' name="entryfield" options='$hasOptionSet' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
 												#end
-											#elseif($programStageDataElement.dataElement.type=='username')
+											#elseif($programStageDataElement.dataElement.valueType=='USERNAME')
 												<input name="entryfield" username='true' class="auto-field optionset" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" />
 											#else
 												<input name="entryfield" id="$id" type="text" value="$!encoder.htmlEncode( $dataValue.value )" class="{validate:{$validate}}" />
@@ -207,7 +207,7 @@
 				#end        
 			</span>
 			##type        
-			<span id="value[$programStageDataElement.dataElement.id].type" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.type )</span></td>       
+			<span id="value[$programStageDataElement.dataElement.id].valueType" class="hidden">$encoder.htmlEncode( $programStageDataElement.dataElement.valueType )</span></td>
 		</td>        
 		##entry        
 		<td class='input-column'>   
@@ -218,17 +218,17 @@
 				#set($hasOptionSet = 'false')
 			#end
 			
-			#set($type=$programStageDataElement.dataElement.getDetailedNumberType())
+			#set($type=$programStageDataElement.dataElement.valueType)
 			#set($validate = '')
-			#if( $type=='number' ) 
+			#if( $type=='NUMBER' )
 				#set($validate="number:true") 
-			#elseif( $type=='positiveNumber' )
+			#elseif( $type=='INTEGER_POSITIVE' )
 				#set($validate="positive_integer:true") 
-			#elseif( $type=='negativeNumber' )
+			#elseif( $type=='INTEGER_NEGATIVE' )
 				#set($validate="negative_integer:true")
-			#elseif( $type=='zeroPositiveInt' )
+			#elseif( $type=='INTEGER_ZERO_OR_POSITIVE' )
 				#set($validate="zeroPositiveInt:true")
-			#elseif( $type=='int' )
+			#elseif( $type=='INTEGER' )
 				#set($validate="integer:true")
 			#end
 			
@@ -239,17 +239,17 @@
 				#set($validate=$validate + "required:true")
 			#end
 				
-			#if( $programStageDataElement.dataElement.textType == "longText" )
+			#if( $programStageDataElement.dataElement.valueType == "LONG_TEXT" )
 				<textarea name="entryfield" type="text" id="$id" maxlength=255 class="{validate:{$validate}}" >$!encoder.htmlEncode( $dataValue.value )</textarea>
-			#elseif( $programStageDataElement.dataElement.type == "bool" )
+			#elseif( $programStageDataElement.dataElement.valueType == "BOOLEAN" )
 				<select name="entryfield" id="$id" class="{validate:{$validate}}" >
 					<option value="">[$i18n.getString( "select_value" )]</option>
 					<option value="true" #if( $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
 					<option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
 				</select>
-			#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
+			#elseif( $programStageDataElement.dataElement.valueType == "TRUE_ONLY" )
 				<input name="entryfield" type="checkbox" id="$id" class="{validate:{$validate}}" >
-			#elseif( $programStageDataElement.dataElement.type == "date" )
+			#elseif( $programStageDataElement.dataElement.valueType == "DATE" )
 				<input name="entryfield" class='datefield' type="text" id="$id" name="entryfield" value="$!encoder.htmlEncode( $dataValue.value )"class="{validate:{$validate}}">
 				<script type="text/javascript">
 					datePicker( '$programStageDataElement.programStage.uid' + '-' + '$programStageDataElement.dataElement.uid' + '-val', false, false);
@@ -283,7 +283,7 @@
 				#else
 					<input optionset='$programStageDataElement.dataElement.optionSet.uid' id='$id' name="entryfield" options='$hasOptionSet' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
 				#end
-			#elseif($programStageDataElement.dataElement.type=='username')
+			#elseif($programStageDataElement.dataElement.valueType=='USERNAME')
 				<input name="entryfield" username='true' class="auto-field optionset" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $dataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" />
 			#else
 				<input name="entryfield" id="$id" type="text" value="$!encoder.htmlEncode( $dataValue.value )" class="{validate:{$validate}}" />