1
<table class="mainPageTable" cellpadding="0">
14
<th>$i18n.getString( "nr" )</th>
15
<th>$i18n.getString( "data_element" )</th>
16
<th>$i18n.getString( "type" )</th>
17
<th>$i18n.getString( "min" )</th>
18
<th>$i18n.getString( "entry" )</th>
19
<th>$i18n.getString( "max" )</th>
20
<th>$i18n.getString( "comment" )</th>
21
<!--<th>$i18n.getString( "timestamp" )</th>-->
22
<!--<th>$i18n.getString( "stored_by" )</th>-->
27
#foreach( $dataElement in $section.dataElements )
28
#set( $count = $count + 1 )
34
#set( $dataValue = false )
35
#set( $dataValue = $dataValueMap.get( $dataElement.id ) )
36
#set( $calculatedValue = false )
37
#set( $calculatedValue = $calculatedValueMap.get( $dataElement ) )
38
#set( $minMax = false )
39
#set( $minMax = $minMaxMap.get( $dataElement.id ) )
40
#set( $calculated = false )
41
#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
42
<tr #if( $mark == 0 ) style="background-color:#dddddd" #end>
44
<td style="text-align:right">$count</td>
48
<span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
49
#if( $dataElement.type == "int" && $auth.hasAccess( "dhis-web-dataentry", "viewHistory" ) )
50
<a href="javascript:viewHistory( $dataElement.id )">
53
$encoder.htmlEncode( $dataElement.shortName )
55
$encoder.htmlEncode( $dataElement.name )
57
#if( $dataElement.type == "int" && $auth.hasAccess( "dhis-web-dataentry", "viewHistory" ) )
64
<td>$dataElementTypeMap.get( $dataElement.type )<span id="value[$dataElement.id].type" style="display:none">$dataElement.type</span></td>
68
#if( $dataElement.type == "int" )
69
<div id="value[$dataElement.id].min" style="text-align:center">$!minMax.min</div>
75
#if( $dataElement.type == "bool" )
76
<select name="entryselect" id="value[$dataElement.id].boolean" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex">
77
<option value="">[$i18n.getString( "no_value" )]</option>
78
<option value="true" #if( $datavalue && $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
79
<option value="false" #if( $datavalue && $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
82
#set( $minMaxError = false )
83
#if( $dataElement.type == "int" && $dataValue && $minMax )
84
#if( $integer.parseInt( $dataValue.value ) < $minMax.min || $integer.parseInt( $dataValue.value ) > $minMax.max )
85
#set( $minMaxError = true )
89
<input name="entryfield" id="value[$dataElement.id].value" 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( $dataElement.type == "int" ) ;text-align:center #end">
91
<input name="entryfield" id="value[$dataElement.id].value" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, '$encoder.jsEncode( $dataElement.name )' )" #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">
98
#if( $dataElement.type == "int" )
99
<div id="value[$dataElement.id].max" style="text-align:center">$!minMax.max</div>
105
<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>
106
<option value="">[$i18n.getString( "no_comment" )]</option>
107
<option value="custom">[$i18n.getString( "custom_comment" )]</option>
108
#foreach( $comment in $standardComments )
109
<option value="$encoder.htmlEncode( $comment )" #if( $datavalue.comment && $comment == $dataValue.comment ) selected="selected" #end>$encoder.htmlEncode( $comment )</option>
112
<input id="value[$dataElement.id].comment" type="text" value="$!encoder.htmlEncode( $dataValue.comment )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveComment" ))
113
onblur="commentLeft( $dataElement.id )" #else disabled="disabled" #end style="width:100% #if( !$dataValue.comment || $standardComments.contains( $dataValue.comment )) ;display:none #end">
115
<!--<td><span id="value[$dataElement.id].timestamp">#if( $dataValue.timestamp ) $format.formatDateTime( $dataValue.timestamp ) #end</span></td>-->
116
<!--<td><span id="value[$dataElement.id].storedBy">$!encoder.htmlEncode( $dataValue.storedBy )</span></td>-->
118
#set( $tabIndex = $tabIndex + 1 )
b'\\ No newline at end of file'