← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20009: fixes for type => valueType conversion in data entry module

 

------------------------------------------------------------
revno: 20009
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-07 10:01:40 +0700
message:
  fixes for type => valueType conversion in data entry module
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.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-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm	2013-12-21 17:07:21 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm	2015-09-07 03:01:40 +0000
@@ -81,13 +81,13 @@
                 #set( $dataEntryId = "${organisationUnit.uid}-${dataElement.uid}-${optionCombo.uid}-val" )
                 #set( $greyedField = false )
                 #set( $greyedField = $greyedFields.get( "$dataElement.uid:$optionCombo.uid" ) )
-                #if( $dataElement.type == "bool" )
+                #if( $dataElement.valueType == "BOOLEAN" )
                 <td><select name="entryselect" class="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
                   <option value="">[$i18n.getString( "no_value" )]</option>
                   <option value="true">$i18n.getString( "yes" )</option>
                   <option value="false">$i18n.getString( "no" )</option>
                 </select></td>
-                #elseif( $dataElement.type == 'trueOnly' )
+                #elseif( $dataElement.valueType == 'TRUE_ONLY' )
                     <td><input name="entrytrueonly" class="entrytrueonly" id="$dataEntryId" type="checkbox" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
                 #else
                     #if( $dataElement.optionSet )
@@ -162,13 +162,13 @@
                     #set( $dataEntryId = "${organisationUnit.uid}-${dataElement.uid}-${optionCombo.uid}-val" )
                     #set( $greyedField = false )
                     #set( $greyedField = $greyedFields.get( "$dataElement.uid:$optionCombo.uid" ) )
-                    #if( $dataElement.type == "bool" )
+                    #if( $dataElement.valueType == "BOOLEAN" )
                     <td><select name="entryselect" class="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
                       <option value="">[$i18n.getString( "no_value" )]</option>
                       <option value="true">$i18n.getString( "yes" )</option>
                       <option value="false">$i18n.getString( "no" )</option>
                     </select></td>
-                    #elseif( $dataElement.type == 'trueOnly' )
+                    #elseif( $dataElement.valueType == 'TRUE_ONLY' )
                         <td><input name="entrytrueonly" class="entrytrueonly" id="$dataEntryId" type="checkbox" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
                     #else
                         #if( $dataElement.optionSet )
@@ -211,13 +211,13 @@
                 #set( $dataEntryId = "${organisationUnit.uid}-${dataElement.uid}-${optionCombo.uid}-val" )
                 #set( $greyedField = false )
                 #set( $greyedField = $greyedFields.get( "$dataElement.uid:$optionCombo.uid" ) )
-                #if( $dataElement.type == "bool" )
+                #if( $dataElement.valueType == "BOOLEAN" )
                 <td><select name="entryselect" class="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
                   <option value="">[$i18n.getString( "no_value" )]</option>
                   <option value="true">$i18n.getString( "yes" )</option>
                   <option value="false">$i18n.getString( "no" )</option>
                 </select></td>
-                #elseif( $dataElement.type == 'trueOnly' )
+                #elseif( $dataElement.valueType == 'TRUE_ONLY' )
                     <td><input name="entrytrueonly" class="entrytrueonly" id="$dataEntryId" type="checkbox" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
                 #else
                     #if( $dataElement.optionSet )

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2015-03-31 13:27:32 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2015-09-07 03:01:40 +0000
@@ -90,15 +90,15 @@
     #set( $commentId = "${dataElement.uid}-${optionCombo.uid}-comment" )
     #set( $greyedField = false )
     #set( $greyedField = $greyedFields.get( "${dataElement.uid}:${optionCombo.uid}" ) )
-    #if( $dataElement.type == "bool" )
+    #if( $dataElement.valueType == "BOOLEAN" )
     <td><select name="entryselect" class="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
       <option value="">[$i18n.getString( "no_value" )]</option>
       <option value="true">$i18n.getString( "yes" )</option>
       <option value="false">$i18n.getString( "no" )</option>
     </select><img class="commentlink" id="${commentId}"></td>
-    #elseif( $dataElement.type == "trueOnly" )
+    #elseif( $dataElement.valueType == "TRUE_ONLY" )
         <td><input name="entrytrueonly" class="entrytrueonly" id="${dataEntryId}" type="checkbox" tabindex="${tabIndex}"#if( $greyedField || !$hasAccess ) disabled="disabled"#end><img class="commentlink" id="${commentId}"></td>
-    #elseif( $dataElement.type == "string" && "longText" == $dataElement.textType )
+    #elseif( "LONG_TEXT" == $dataElement.valueType )
         <td><textarea name="entryfield" class="entryfield entryarea" id="${dataEntryId}" tabindex="${tabIndex}" #if( $greyedField || !$hasAccess ) disabled="disabled"#end></textarea></td>
     #else
         #if( $dataElement.optionSet )