← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2347: Fixed bug when saving comment in dataentry's section and minor fixed in data set section.

 

------------------------------------------------------------
revno: 2347
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-10-12 15:22:10 +0700
message:
  Fixed bug when saving comment in dataentry's section and minor fixed in data set section.
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/multidimensional.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseSectionObject.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.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/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2010-10-08 11:12:29 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml	2010-10-12 08:22:10 +0000
@@ -26,9 +26,11 @@
 			<param name="page">/dhis-web-dataentry/select.vm</param>
 			<param name="menu">/dhis-web-dataentry/menu.vm</param>
 			<param name="menuTreeHeight">420</param>
-			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/general.js,javascript/form.js,
-			../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
-      		,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
+			<param name="javascripts">
+				../dhis-web-commons/ouwt/ouwt.js,
+				javascript/general.js,
+				javascript/form.js
+			</param>
 			<param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
 		</action>
 
@@ -53,9 +55,7 @@
 				javascript/general.js,javascript/form.js,
 				../dhis-web-commons/calendar/calendar.js,
 				../dhis-web-commons/calendar/calendar-lang.js,
-				../dhis-web-commons/calendar/calendar-setup.js,
-				../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
-      		,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js
+				../dhis-web-commons/calendar/calendar-setup.js
 			</param>
 			<param name="stylesheets">style/dhis-web-dataentry.css,style/custom_data_entry_form_styles.css</param>
 		</action>
@@ -71,8 +71,7 @@
 				javascript/general.js,javascript/form.js,javascript/section.js,javascript/multidimensional.js,
 				../dhis-web-commons/calendar/calendar.js,
 				../dhis-web-commons/calendar/calendar-lang.js,
-				../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
-      		,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js
+				../dhis-web-commons/calendar/calendar-setup.js
 			</param>
 			<param name="stylesheets">style/dhis-web-dataentry.css</param>
 		</action>

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/multidimensional.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/multidimensional.js	2010-10-07 11:14:36 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/multidimensional.js	2010-10-12 08:22:10 +0000
@@ -21,15 +21,10 @@
 // Comments
 // -----------------------------------------------------------------------------
 
-// -----------------------------------------------------------------------------
-// Comments
-// -----------------------------------------------------------------------------
-
 function commentSelected( dataElementId, optionComboId )
-{  
-    var commentSelector = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comments' );
-    var commentField = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comment' );
-
+{
+    var commentSelector = byId( 'value[' + dataElementId + ':' + optionComboId + '].comments' );
+    var commentField = byId( 'value[' + dataElementId + ':' + optionComboId + '].comment' );
     var value = commentSelector.options[commentSelector.selectedIndex].value;
     
     if ( value == 'custom' )
@@ -44,14 +39,14 @@
     {
         commentField.value = value;
         
-        saveComment( dataElementId, value );
+        saveComment( dataElementId, optionComboId, value );
     }
 }
 
 function commentLeft( dataElementId, optionComboId )
 {
-    var commentField = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comment' );
-    var commentSelector = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comments' );
+    var commentField = byId( 'value[' + dataElementId + ':' + optionComboId + '].comment' );
+    var commentSelector = byId( 'value[' + dataElementId + ':' + optionComboId + '].comments' );
 
     saveComment( dataElementId, optionComboId, commentField.value );
 
@@ -60,6 +55,7 @@
     if ( value == '' )
     {
         commentField.style.display = 'none';
+		commentSelector.style.css = "combobox";
         commentSelector.style.display = 'inline';
 
         commentSelector.selectedIndex = 0;
@@ -72,8 +68,8 @@
 
 function saveValue( dataElementId, optionComboId, dataElementName, zeroValueSaveMode )
 {
-    var field = document.getElementById( 'value[' + dataElementId + '].value' + ':' +  'value[' + optionComboId + '].value');
-    var type = document.getElementById( 'value[' + dataElementId + '].type' ).innerHTML;   
+    var field = byId( 'value[' + dataElementId + '].value' + ':' +  'value[' + optionComboId + '].value');
+    var type = byId( 'value[' + dataElementId + '].type' ).innerHTML;   
 	var organisationUnitId = getFieldValue( 'organisationUnitId' );
     
     field.style.backgroundColor = '#ffffcc';
@@ -89,9 +85,8 @@
         		window.alert( i18n_saving_zero_values_unnecessary  );
         		field.select();
    	            field.focus(); 
-   	                   		
-				return;    
-				    		
+
+				return;
         	}
             
             if ( !isInt( field.value ))
@@ -108,8 +103,8 @@
             
             else
             {
-                var minString = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].min' ).innerHTML;
-                var maxString = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].max' ).innerHTML;
+                var minString = byId( 'value[' + dataElementId + ':' + optionComboId + '].min' ).innerHTML;
+                var maxString = byId( 'value[' + dataElementId + ':' + optionComboId + '].max' ).innerHTML;
 
                 if ( minString.length != 0 && maxString.length != 0 )
                 {
@@ -167,8 +162,8 @@
 
 function saveComment( dataElementId, optionComboId, commentValue )
 {
-    var field = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comment' );                
-    var select = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comments' );
+    var field = byId( 'value[' + dataElementId + ':' + optionComboId + '].comment' );                
+    var select = byId( 'value[' + dataElementId + ':' + optionComboId + '].comments' );
 	var organisationUnitId = getFieldValue( 'organisationUnitId' );
     
     field.style.backgroundColor = '#ffffcc';
@@ -246,12 +241,12 @@
     
     function markValue( color )
     {
-        var type = document.getElementById( 'value[' + dataElementId + '].type' ).innerText;
+        var type = byId( 'value[' + dataElementId + '].type' ).innerText;
         var element;
         
         if ( type == 'bool' )
         {
-            element = document.getElementById( 'value[' + dataElementId + '].boolean' );
+            element = byId( 'value[' + dataElementId + '].boolean' );
         }
         else if( selectedOption )
         {
@@ -259,9 +254,8 @@
         }
         else
         {            
-            element = document.getElementById( 'value[' + dataElementId + '].value' + ':' +  'value[' + optionComboId + '].value');            
+            element = byId( 'value[' + dataElementId + '].value' + ':' +  'value[' + optionComboId + '].value');            
         }
-        
 
         element.style.backgroundColor = color;
     }
@@ -311,8 +305,8 @@
     
     function markComment( color )
     {
-        var field = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comment' );                
-        var select = document.getElementById( 'value[' + dataElementId + ':' + optionComboId + '].comments' );        
+        var field = byId( 'value[' + dataElementId + ':' + optionComboId + '].comment' );                
+        var select = byId( 'value[' + dataElementId + ':' + optionComboId + '].comments' );        
 
         field.style.backgroundColor = color;
         select.style.backgroundColor = color;
@@ -350,11 +344,11 @@
     
     for ( dataElementId in factorMap )
     {
-    	dataElementValue = document.getElementById( 'value[' + dataElementId + '].value' ).value;
+    	dataElementValue = byId( 'value[' + dataElementId + '].value' ).value;
     	value += ( dataElementValue * factorMap[dataElementId] );
     }
     
-    document.getElementById( 'value[' + cdeId + '].value' ).value = value;
+    byId( 'value[' + cdeId + '].value' ).value = value;
 }
 
 /**
@@ -373,7 +367,6 @@
   	    {
   	    	return cdeId;
   	    }
-
     }
 
     return null;
@@ -399,7 +392,7 @@
 	{
 		dataElementId = value.getAttribute('dataElementId');
 		value = value.firstChild.nodeValue;		
-		document.getElementById( 'value[' + dataElementId + '].value' ).value = value;
+		byId( 'value[' + dataElementId + '].value' ).value = value;
 	}
 	
 	unLockScreen();
@@ -438,7 +431,6 @@
             setInnerHTML('value[' + deId + ':' + ocId + '].min', getElementValue( dataElements[i], 'minLimit'));
             setInnerHTML('value[' + deId + ':' + ocId + '].max', getElementValue( dataElements[i], 'maxLimit'));
         }
-        
     }
     
     function handleHttpError( errorCode )
@@ -446,7 +438,6 @@
         window.alert( i18n_saving_minmax_failed_error_code + '\n\n' + errorCode );
     }   
    
-    
     function getElementValue( parentElement, childElementName )
     {
         var textNode = parentElement.getElementsByTagName( childElementName )[0].firstChild;

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm	2010-09-17 07:21:45 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm	2010-10-12 08:22:10 +0000
@@ -1,11 +1,11 @@
 <table class="mainPageTable" cellpadding="0">
-	<col id="noCol">
-	<col id="deCol">
-	<col id="typeCol">
-	<col id="minCol">
-    <col id="entryCol">
-	<col id="maxCol">
-	<col id="commentCol">
+	<col id="noCol"/>
+	<col id="deCol"/>
+	<col id="typeCol"/>
+	<col id="minCol"/>
+    <col id="entryCol"/>
+	<col id="maxCol"/>
+	<col id="commentCol"/>
 	<!--
 	<col>
 	<col>
@@ -44,7 +44,7 @@
 	#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
 	<tr>
 		##count
-		<td style="text-align:right">$count</td>
+		<td style="text-align:center">$count</td>
 		
 		##data element name
 		<td #if( $mark == 0 ) style="background-color:#dddddd" #end>
@@ -69,7 +69,7 @@
 		##min value
 		<td>
 		#if( $dataElement.type == "int" )
-			<div id="value[$dataElement.id:$defaultOptionComboId].min" style="text-align:center">$!minMax.min</div>
+			<div id="value[$dataElement.id:$optionComboId].min" style="text-align:center">$!minMax.min</div>
 		#end
 		</td>
 		
@@ -77,12 +77,12 @@
 		<td>
 		      
 		    #set( $greyedField = false )		         
-            #set( $greyedField = $greyedFields.get( "$dataElement.id:$defaultOptionComboId" ) )  	
+            #set( $greyedField = $greyedFields.get( "$dataElement.id:$optionComboId" ) )  	
 		   
-		    #set( $dataEntryId = "value[$dataElement.id].value:value[$defaultOptionComboId].value" )
+		    #set( $dataEntryId = "value[$dataElement.id].value:value[$optionComboId].value" )
 		    ##Data Entry
 			#if( $dataElement.type == "bool" )
-			 <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $defaultOptionComboId, this )" #else disabled="disabled" #end style="width:100%  #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $greyedField ) disabled="disabled" #end>
+			 <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $optionComboId, this )" #else disabled="disabled" #end style="width:100%  #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $greyedField ) disabled="disabled" #end>
 				<option value="">[$i18n.getString( "no_value" )]</option>
 				<option value="true" #if( $datavalue && $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
 				<option value="false" #if( $datavalue && $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
@@ -90,11 +90,11 @@
 			 
             #elseif( $dataElement.type == "date" )
                 <input name="entryfield" id="value[$dataElement.id].date" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveDate( $dataElement.id, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end #if( $greyedField ) disabled="disabled" #end>
-                <img src="../images/calendar_icon.gif" width="16" height="16" id="getValueDate" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "value_date" )">
+                <img src="../images/calendar_icon.gif" width="16" height="16" id="getValueDate" style="cursor: pointer;" title="$i18n.getString( 'date_selector' )" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( 'value_date' )"/>
                 <script type="text/javascript">
                     Calendar.setup({
                         inputField     :    "value[$dataElement.id].date",      // id of the input field
-                        ifFormat       :    "$i18n.getString("format.date.label")",       // format of the input field
+                        ifFormat       :    "$i18n.getString('format.date.label')",       // format of the input field
                         button         :    "getValueDate"   // trigger for the calendar (button ID)
                     });
                 </script>   
@@ -108,7 +108,7 @@
                         #end
                     #end  
                         #if($coun>0)   
-                            <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $defaultOptionComboId, this )"  #else disabled="disabled" #end style="width:100%  style="width:100%  #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
+                            <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $optionComboId, this )"  #else disabled="disabled" #end style="width:100% #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $locked ) disabled="disabled" #end #if( $greyedField ) disabled="disabled" #end>
                             <option value="">[$i18n.getString( "please_select" )] </option>                
                                 #foreach($customValue in $customValues)
                                     #if($dataElement.id == $customValue.dataElement.id && $dataValue.optionCombo.id == $customValue.optionCombo.id)
@@ -118,7 +118,7 @@
                             </select>
                         #else
                         #set( $zeroValueSaveMode = true )
-                               <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $defaultOptionComboId, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $defaultOptionComboId, true  )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end style="width:100%  #if( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>                                
+                            <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $optionComboId, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionComboId, true  )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == 'int' ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled" #end #if( $greyedField ) disabled="disabled" #end />
                         #end    
                 #end           
 
@@ -129,10 +129,10 @@
 				    #end			     
 			    #end
 			    #if ( $calculated && $dataElement.type != "string")
-			     <input name="entryfield" id="$dataEntryId" class="calculated" type="text" value="#if($dataValue) $!encoder.htmlEncode( $dataValue.value ) #elseif( $calculatedValue )$!encoder.htmlEncode( $calculatedValue ) #end" disabled="disabled" onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" #if( $greyedField ) disabled="disabled" #end>
+			     <input name="entryfield" id="$dataEntryId" class="calculated" type="text" value="#if($dataValue) $!encoder.htmlEncode( $dataValue.value ) #elseif( $calculatedValue )$!encoder.htmlEncode( $calculatedValue ) #end" disabled="disabled" onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == 'int' ) ;text-align:center #end" #if( $greyedField ) disabled="disabled" #end />
 			    #else 
                     #if ( $dataElement.type != "string")
-			         <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $defaultOptionComboId, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $greyedField ) ;background-color:#000000 #end #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $greyedField ) disabled="disabled" #end>
+			         <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $optionComboId, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $greyedField ) ;background-color:#000000 #end #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == 'int' ) ;text-align:center #end" tabindex="$tabIndex" #if( $greyedField ) disabled="disabled" #end />
                     #end
                 #end
 		  #end
@@ -141,21 +141,21 @@
 		##max value
 		<td>
 		#if( $dataElement.type == "int" )
-			<div id="value[$dataElement.id:$defaultOptionComboId].max" style="text-align:center">$!minMax.max</div>
+			<div id="value[$dataElement.id:$optionComboId].max" style="text-align:center">$!minMax.max</div>
 		#end
 		</td>
 		
 		##comment
 		<td>
-			<select id="value[$dataElement.id].comments" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" )) onchange="commentSelected( $dataElement.id )" #else disabled="disabled" #end #if( $dataValue.comment && !$standardComments.contains( $dataValue.comment )) style="display:none; width:100%" #end #if( $greyedField == "true" ) disabled="disabled"#end>
+			<select id="value[$dataElement.id:$optionComboId].comments" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" )) onchange="commentSelected( $dataElement.id, $optionComboId )" #else disabled="disabled" #end #if( $dataValue.comment && !$standardComments.contains( $dataValue.comment )) style="display:none; width:100%" #end #if( $greyedField == "true" ) disabled="disabled" #end>
 				<option value="">[$i18n.getString( "no_comment" )]</option>
 				<option value="custom">[$i18n.getString( "custom_comment" )]</option>
 			#foreach( $comment in $standardComments )
 				<option value="$encoder.htmlEncode( $comment )" #if( $datavalue.comment && $comment == $dataValue.comment ) selected="selected" #end>$encoder.htmlEncode( $comment )</option>
 			#end
 			</select>
-			<input id="value[$dataElement.id].comment" type="text" value="$!encoder.htmlEncode( $dataValue.comment )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" ))
-			    onblur="commentLeft( $dataElement.id )" #else disabled="disabled" #end style="width:100% #if( !$dataValue.comment || $standardComments.contains( $dataValue.comment )) ;display:none #end" #if( $greyedField == "true" ) disabled="disabled"#end>
+			<input id="value[$dataElement.id:$optionComboId].comment" type="text" value="$!encoder.htmlEncode( $dataValue.comment )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" ))
+			    onblur="commentLeft( $dataElement.id, $optionComboId )" #else disabled="disabled" #end style="width:100% #if( !$dataValue.comment || $standardComments.contains( $dataValue.comment )) ;display:none #end" #if( $greyedField == "true" ) disabled="disabled" #end/>
 		</td>
 		<!--<td><span id="value[$dataElement.id].timestamp">#if( $dataValue.timestamp ) $format.formatDateTime( $dataValue.timestamp ) #end</span></td>-->
 		<!--<td><span id="value[$dataElement.id].storedBy">$!encoder.htmlEncode( $dataValue.storedBy )</span></td>-->

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm	2010-09-27 10:40:07 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm	2010-10-12 08:22:10 +0000
@@ -18,13 +18,13 @@
     	<table class="mainPageTable">    		
    			<tr>		   
        			<td onclick="openCloseSection( $section.id )" onmouseover="style.backgroundColor='#ebf0f6';" onmouseout="style.backgroundColor='#FFFFFF'">
-       				<div id="$section.id:title" style="text-align:center"><h3>$encoder.htmlEncode( $section.title )</h3></div>
+       				<div id="$section.id:name" style="text-align:center"><h3>$encoder.htmlEncode( $section.name )</h3></div>
        			</td>       				   			        		  
     		</tr>    	
     		<tr>
        			<td>        	
            			<div id="$section.id" style="display:block">        				
-              				
+
             			#set( $isMultiDimensional = $sectionIsMultiDimensional.get( $section.id ) )
                				
             			#if($isMultiDimensional == true )
@@ -32,7 +32,7 @@
            				#else
                 			#parse( "/dhis-web-dataentry/section/dataElement.vm" )
                			#end
-               				               				
+
            			</div>
        			</td>
     		</tr>    		    		    	    	
@@ -53,6 +53,7 @@
 	var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
 	var i18n_saving_comment_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_comment_failed_status_code" ) , "'")';
 	var i18n_saving_minmax_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_minmax_failed_error_code" ) , "'")';
+	var i18n_saving_zero_values_unnecessary = '$encoder.jsEscape( $i18n.getString( "saving_zero_values_unnecessary" ) , "'")';
 	
 	var calculatedDataElementMap = {
 	   #set( $count = 1 )

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2010-10-07 11:14:36 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2010-10-12 08:22:10 +0000
@@ -4,7 +4,7 @@
 
 <div id="currentSelection">
 	#if ( $organisationUnit ) $encoder.htmlEncode( $organisationUnit.name )#else $i18n.getString( "no_organisationunit_selected" ) #end - 
-	#if ( $period ) $format.formatPeriod( $period ) #else $i18n.getString( "no_period_selected" ) #end <br>				
+	#if ( $period ) $format.formatPeriod( $period ) #else $i18n.getString( "no_period_selected" ) #end <br/>				
 	<span id="currentDataElement">$i18n.getString( "no_dataelement_selected" )</span> -
 	<span id="currentOptionCombo">$i18n.getString( "no_option_selected" )</span>	
 </div>
@@ -13,12 +13,12 @@
 <input type="hidden" value="$organisationUnit.id" id="organisationUnitId"/>
 <div id="actions" style="width:200px text-align:right">
 	
-    <input type="button" value="$i18n.getString( "change_order" )" onclick="changeOrder()" style="width:150px" #if( !$selectedDataSetId || !$auth.hasAccess( "dhis-web-dataentry", "getDataElementOrder" ) || $displayMode !="defaultform") disabled="disabled" #end><br>
-    <input type="button" value="$i18n.getString( "generate_min_max" )" onclick="javascript:generateMinMaxValues();" style="width:150px" #if( !$selectedPeriodIndex || !$auth.hasAccess( "dhis-web-dataentry", "minMaxGeneration" )) disabled="disabled" #end><br>
-    <input type="button" value="$i18n.getString( "run_validation" )" onclick="javascript:validate();" style="width:150px" #if( !$selectedPeriodIndex ) disabled="disabled" #end><br>
-    <input type="button" id="calculateCDEs" value="$i18n.getString( "save_calculated" )" name="calculateCDEs" onclick="calculateAndSaveCDEs();" style="width:150px" #if( !$selectedPeriodIndex ) disabled="disabled" #end><br>
+    <input type="button" value="$i18n.getString( 'change_order' )" onclick="changeOrder()" style="width:150px" #if( !$selectedDataSetId || !$auth.hasAccess( "dhis-web-dataentry", "getDataElementOrder" ) || $displayMode !="defaultform") disabled="disabled" #end/><br/>
+    <input type="button" value="$i18n.getString( 'generate_min_max' )" onclick="javascript:generateMinMaxValues();" style="width:150px" #if( !$selectedPeriodIndex || !$auth.hasAccess( "dhis-web-dataentry", "minMaxGeneration" )) disabled="disabled" #end/><br/>
+    <input type="button" value="$i18n.getString( 'run_validation' )" onclick="javascript:validate();" style="width:150px" #if( !$selectedPeriodIndex ) disabled="disabled" #end/><br/>
+    <input type="button" id="calculateCDEs" value="$i18n.getString( 'save_calculated' )" name="calculateCDEs" onclick="calculateAndSaveCDEs();" style="width:150px" #if( !$selectedPeriodIndex ) disabled="disabled" #end/><br/>
 
-    <br>
+    <br/>
 	<input type="radio" id="displayModeCustom" name="displayMode" value="customform"
        #if( $displayMode == "customform" ) 
            checked="checked" 
@@ -26,8 +26,8 @@
        #if( !$customDataEntryFormExists ) 
            disabled="disabled" 
        #end         
-       onclick="document.getElementById( 'selectForm' ).submit();">    
-    <label for="displayModeCustom">$i18n.getString( "use_custom_form" )</label><br>
+       onclick="document.getElementById( 'selectForm' ).submit();"/>    
+    <label for="displayModeCustom">$i18n.getString( "use_custom_form" )</label><br/>
 
 	<input type="radio" id="displayModeSection" name="displayMode" value="sectionform"
 	   #if( $displayMode == "sectionform" ) 
@@ -36,16 +36,16 @@
 	   #if( !$haveSection ) 
 	       disabled="disabled" 
 	   #end 
-	   onclick="document.getElementById( 'selectForm' ).submit();">
-	<label for="displayModeSection">$i18n.getString( "use_section_form" )</label><br>
+	   onclick="document.getElementById( 'selectForm' ).submit();"/>
+	<label for="displayModeSection">$i18n.getString( "use_section_form" )</label><br/>
 
 	<input type="radio" id="displayModeDefault" name="displayMode" value="defaultform"
        #if( $displayMode == "defaultform" ) 
            checked="checked" 
            
        #end       
-       onclick="document.getElementById( 'selectForm' ).submit();">    
-    <label for="displayModeDefault">$i18n.getString( "use_default_form" )</label><br><br>
+       onclick="document.getElementById( 'selectForm' ).submit();"/>    
+    <label for="displayModeDefault">$i18n.getString( "use_default_form" )</label><br/><br/>
 
 </div>
 
@@ -53,7 +53,7 @@
 	
 	<tr>
 		<td><label>$i18n.getString( "organisation_unit" )</label></td>
-		<td><input type="text" readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( "select" )]" #end style="min-width:350px"></td>
+		<td><input type="text" readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( 'select' )]" #end style="min-width:350px"/></td>
 	</tr>
 	
 	<tr>
@@ -71,8 +71,8 @@
 	<tr>
 		<td><label for="selectedPeriodIndex">$i18n.getString( "period" )</label></td>
 		<td>
-			<input type="button" value="&lt;&lt;" title="$i18n.getString('earlier_periods')" onclick="window.location.href='previousPeriods.action'" #if( $periods.size() == 0 ) disabled="disabled" #end>
-			<input type="button" value="&gt;&gt;" title="$i18n.getString('later_periods')" onclick="window.location.href='nextPeriods.action'" #if( $periods.size() == 0 ) disabled="disabled" #end><br>
+			<input type="button" value="&lt;&lt;" title="$i18n.getString('earlier_periods')" onclick="window.location.href='previousPeriods.action'" #if( $periods.size() == 0 ) disabled="disabled" #end/>
+			<input type="button" value="&gt;&gt;" title="$i18n.getString('later_periods')" onclick="window.location.href='nextPeriods.action'" #if( $periods.size() == 0 ) disabled="disabled" #end/><br/>
 			<select id="selectedPeriodIndex" name="selectedPeriodIndex" style="min-width:350px" onchange="document.getElementById( 'selectForm' ).submit();" #if( $periods.size() == 0 ) disabled="disabled" #end>
 				<option value="null">[$i18n.getString( "select" )]</option>
 			    #foreach( $period in $periods )
@@ -87,8 +87,8 @@
 
 </form>
 
-<hr style="clear:both">
-<br>
+<hr style="clear:both"/>
+<br/>
 
 <script type="text/javascript">
 	var i18n_save_calculated_data_element_success = '$encoder.jsEscape( $i18n.getString( "save_calculated_data_element_success" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js	2010-09-08 11:00:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js	2010-10-12 08:22:10 +0000
@@ -12,9 +12,8 @@
 
 function sectionReceived( sectionElement )
 {
-  setInnerHTML( 'idField', getElementValue( sectionElement, 'id' ) );
   setInnerHTML( 'nameField', getElementValue( sectionElement, 'name' ) );
-  setInnerHTML( 'titleField', getElementValue( sectionElement, 'title' ) );
+  //setInnerHTML( 'titleField', getElementValue( sectionElement, 'title' ) );
   setInnerHTML( 'dataSetField', getElementValue( sectionElement, 'dataSet' ) );
   setInnerHTML( 'categoryComboField', getElementValue( sectionElement, 'categoryCombo' ) );
   setInnerHTML( 'dataElementCountField', getElementValue( sectionElement, 'dataElementCount' ) );  

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseSectionObject.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseSectionObject.vm	2010-07-07 10:56:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseSectionObject.vm	2010-10-12 08:22:10 +0000
@@ -2,7 +2,7 @@
 <dataSet>
   <id>$section.id</id>
   <name>$encoder.xmlEncode( $section.name )</name>
-  <title>$encoder.xmlEncode( $section.title )</title>
+  <!--title>$encoder.xmlEncode( $section.title )</title-->
   <dataSet>$encoder.xmlEncode( $section.dataSet.name )</dataSet>  
   <categoryCombo>$encoder.xmlEncode( $categoryCombo.name )</categoryCombo>
   <dataElementCount>$sectionDataElements.size()</dataElementCount>  

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm	2010-09-21 06:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm	2010-10-12 08:22:10 +0000
@@ -65,10 +65,9 @@
 			<div id="detailsArea" style="display:none">
 				<div style="float:right">
 					<a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"></a>
-				</div>				
-				<p><label>$i18n.getString( "id" ):</label><br/><span id="idField"></span></p>
+				</div>
 				<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
-				<p><label>$i18n.getString( "title" ):</label><br/><span id="titleField"></span></p>
+				<!--p><label>$i18n.getString( "title" ):</label><br/><span id="titleField"></span></p-->
 				<p><label>$i18n.getString( "dataset" ):</label><br/><span id="dataSetField"></span></p>
 				<p><label>$i18n.getString( "category_combo" ):</label><br/><span id="categoryComboField"></span></p>				
 				<p><label>$i18n.getString( "number_of_data_elements" ):</label><br/><span id="dataElementCountField"></span></p>