dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08476
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2037: Removed old SaveValue action class
------------------------------------------------------------
revno: 2037
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2010-11-11 22:43:28 +0100
message:
Removed old SaveValue action class
removed:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultStatefulDataValueSaver.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml
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/multidimensional/form.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.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
=== removed file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java 2010-09-24 06:12:10 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java 1970-01-01 00:00:00 +0000
@@ -1,241 +0,0 @@
-package org.hisp.dhis.de.action;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.Date;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueAudit;
-import org.hisp.dhis.datavalue.DataValueAuditService;
-import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.de.state.SelectedStateManager;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.user.CurrentUserService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Torgeir Lorange Ostby
- */
-public class SaveValueAction
- implements Action
-{
- private static final Log log = LogFactory.getLog( SaveValueAction.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private CurrentUserService currentUserService;
-
- public void setCurrentUserService( CurrentUserService currentUserService )
- {
- this.currentUserService = currentUserService;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private DataValueService dataValueService;
-
- public void setDataValueService( DataValueService dataValueService )
- {
- this.dataValueService = dataValueService;
- }
-
- private DataValueAuditService dataValueAuditService;
-
- public void setDataValueAuditService( DataValueAuditService dataValueAuditService )
- {
- this.dataValueAuditService = dataValueAuditService;
- }
-
- private SelectedStateManager selectedStateManager;
-
- public void setSelectedStateManager( SelectedStateManager selectedStateManager )
- {
- this.selectedStateManager = selectedStateManager;
- }
-
- private DataElementCategoryService categoryService;
-
- public void setCategoryService( DataElementCategoryService categoryService )
- {
- this.categoryService = categoryService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // Input/output
- // -------------------------------------------------------------------------
-
- private String value;
-
- public void setValue( String value )
- {
- this.value = value;
- }
-
- private int dataElementId;
-
- public void setDataElementId( int dataElementId )
- {
- this.dataElementId = dataElementId;
- }
-
- public int getDataElementId()
- {
- return dataElementId;
- }
-
- private int organisationUnitId;
-
- public void setOrganisationUnitId( int organisationUnitId )
- {
- this.organisationUnitId = organisationUnitId;
- }
-
- private int statusCode;
-
- public int getStatusCode()
- {
- return statusCode;
- }
-
- private Date timestamp;
-
- public Date getTimestamp()
- {
- return timestamp;
- }
-
- private String storedBy;
-
- public String getStoredBy()
- {
- return storedBy;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-
- Period period = selectedStateManager.getSelectedPeriod();
-System.out.println("\n\n\n ++++ selected period : " + period + " +++++ \n" );
- DataElement dataElement = dataElementService.getDataElement( dataElementId );
-
- storedBy = currentUserService.getCurrentUsername();
-
- if ( storedBy == null )
- {
- storedBy = "[unknown]";
- }
-
- if ( value != null && value.trim().length() == 0 )
- {
- value = null;
- }
-
- if ( value != null )
- {
- value = value.trim();
- }
-
- // ---------------------------------------------------------------------
- // Save or update
- // ---------------------------------------------------------------------
-
- DataElementCategoryOptionCombo defaultOptionCombo = categoryService.getDefaultDataElementCategoryOptionCombo();
-
- DataValue dataValue = dataValueService.getDataValue( organisationUnit, dataElement, period, defaultOptionCombo );
-
- if ( dataValue == null )
- {
- if ( value != null )
- {
- log.debug( "Adding DataValue" );
-
- dataValue = new DataValue( dataElement, period, organisationUnit, value, storedBy, new Date(), null,
- defaultOptionCombo );
-
- dataValueService.addDataValue( dataValue );
- }
- }
- else
- {
- log.debug( "Updating DataValue" );
-
- DataValueAudit audit = new DataValueAudit( dataValue, dataValue.getValue(), storedBy, new Date(), "" );
-
- dataValue.setValue( value );
- dataValue.setTimestamp( new Date() );
- dataValue.setStoredBy( storedBy );
-
- dataValueService.updateDataValue( dataValue );
-
- // -----------------------------------------------------------------
- // Add DataValueAudit
- // -----------------------------------------------------------------
-
- if ( value != null )
- {
- dataValueAuditService.addDataValueAudit( audit );
- }
- }
-
- if ( dataValue != null )
- {
- this.timestamp = dataValue.getTimestamp();
- this.storedBy = dataValue.getStoredBy();
- }
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java 2010-11-11 18:03:00 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java 2010-11-11 21:43:28 +0000
@@ -37,7 +37,6 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
@@ -49,7 +48,6 @@
import org.hisp.dhis.customvalue.CustomValueService;
import org.hisp.dhis.dataelement.CalculatedDataElement;
import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.hisp.dhis.dataelement.DataElementService;
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultStatefulDataValueSaver.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultStatefulDataValueSaver.java 2009-10-18 22:44:41 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultStatefulDataValueSaver.java 2010-11-11 21:43:28 +0000
@@ -2,15 +2,13 @@
import java.util.Date;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.datavalue.DataValue;
import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.de.action.SaveValueAction;
+import org.hisp.dhis.de.action.multidimensional.SaveValueAction;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.user.CurrentUserService;
@@ -27,8 +25,6 @@
public class DefaultStatefulDataValueSaver
implements StatefulDataValueSaver
{
- private static final Log LOG = LogFactory.getLog( SaveValueAction.class );
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -104,8 +100,6 @@
{
if ( value != null )
{
- LOG.debug( "Adding DataValue, value added" );
-
dataValue = new DataValue( dataElement, period, organisationUnit, value, storedBy, new Date(), null, optionCombo );
dataValueService.addDataValue( dataValue );
@@ -113,8 +107,6 @@
}
else
{
- LOG.debug( "Updating DataValue, value added/changed" );
-
dataValue.setValue( value );
dataValue.setTimestamp( new Date() );
dataValue.setStoredBy( storedBy );
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml 2010-11-11 18:03:00 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml 2010-11-11 21:43:28 +0000
@@ -111,17 +111,6 @@
ref="org.hisp.dhis.de.screen.DataEntryScreenManager" />
</bean>
- <bean id="org.hisp.dhis.de.action.SaveValueAction" class="org.hisp.dhis.de.action.SaveValueAction"
- scope="prototype">
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
- <property name="dataValueAuditService" ref="org.hisp.dhis.datavalue.DataValueAuditService" />
- <property name="selectedStateManager" ref="org.hisp.dhis.de.state.SelectedStateManager" />
- <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
- <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
-
<bean id="org.hisp.dhis.de.action.multidimensional.SaveValueAction" class="org.hisp.dhis.de.action.multidimensional.SaveValueAction"
scope="prototype">
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
=== 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-11-11 18:03:00 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml 2010-11-11 21:43:28 +0000
@@ -81,12 +81,6 @@
<param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
</action>
- <action name="saveValue" class="org.hisp.dhis.de.action.SaveValueAction">
- <result name="success" type="velocity">status.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- <param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
- </action>
-
<action name="saveComment" class="org.hisp.dhis.de.action.SaveCommentAction">
<result name="success" type="velocity">status.vm</result>
<param name="onExceptionReturn">plainTextError</param>
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm 2010-11-11 21:43:28 +0000
@@ -115,7 +115,7 @@
<td>
#if( $dataElement.type == "bool" )
<span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
- <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
<option value="">[$i18n.getString( "no_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>
@@ -129,7 +129,7 @@
#end
#end
#if($coun>0)
- <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
<option value="" </option>
#foreach($customValue in $customValues)
#if($dataElement.id == $customValue.dataElement.id && $optionCombo.id == $customValue.optionCombo.id)
@@ -138,7 +138,7 @@
#end
</select>
#else
- <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
#end
#end
#end
@@ -156,9 +156,9 @@
<div id="value[$dataElement.id:$optionCombo.id].max" style="display:none">$!minMax.max</div>
#if( $dataElement.aggregationOperator == "sum" && $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, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
#elseif( $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, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
#end
</td>
#set( $tabIndex = $tabIndex + 1 )
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.vm 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.vm 2010-11-11 21:43:28 +0000
@@ -75,7 +75,7 @@
#if( $dataElement.type == "bool" )
<span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
- <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, 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>
+ <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, 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( "no_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>
@@ -89,7 +89,7 @@
#end
#end
#if($coun>0)
- <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, 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>
+ <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, 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 && $optionCombo.id == $customValue.optionCombo.id)
@@ -98,7 +98,7 @@
#end
</select>
#else
- <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, 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>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, 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
#end
@@ -116,9 +116,9 @@
<div id="value[$dataElement.id:$optionCombo.id].max" style="display:none">$!minMax.max</div>
#if( $dataElement.aggregationOperator == "sum" && $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, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, 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>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, 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>
#elseif( $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, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, 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>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, 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
</td>
#set( $tabIndex = $tabIndex + 1 )