← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10674: Minor fix.

 

------------------------------------------------------------
revno: 10674
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-04-24 14:41:19 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.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/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-04-18 06:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-04-24 07:41:19 +0000
@@ -146,36 +146,38 @@
 		<tr><th colspan="2" class="heading-column">$attributeGroup.displayName</th></tr>
 		#set($attributes = $attributeGroupsMap.get($attributeGroup.id))
 		#foreach($attribute in $attributes )
-			#set($value = "")
-			#set($value = $patientAttributeValueMap.get($attribute.id))
-			<tr>
-				<td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory) <em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
-				<td class="input-column">
-					#if( $attribute.valueType == "bool" )
-						<select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit"> 
-							<option value="" selected="selected">[$i18n.getString( "please_select" )]</option>
-							<option value="true" #if($value=='true') selected #end>$i18n.getString( "yes" )</option>
-							<option value="false" #if($value=='false') selected #end>$i18n.getString( "no" )</option>
-						</select>                
-					#elseif( $attribute.valueType == "trueOnly" )
-						<input type='checkbox' value="true" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" #if($value=='true') checked #end> 
-					#elseif( $attribute.valueType == "date" )
-						<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class=' #validate( "default"  $attribute.mandatory )'/>
-						<script type="text/javascript">
-							datePickerValid( 'attr$attribute.id', false, false );
-						</script>                    
-					#elseif( $attribute.valueType == "combo" )  
-						<select  id="attr$attribute.id"  name="attr$attribute.id" inherit="$!attribute.inherit" class='#validate( "default"  $attribute.mandatory )'>
-							<option value="">[$i18n.getString( "please_select" )]</option>
-							#foreach ($option in $attribute.attributeOptions )
-								<option value="$option.id" #if("$value"=="$option.name") selected #end>$option.name</option>
-							#end
-						</select>
-					#else
-						<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class="{validate:{required:$attribute.mandatory #if($attribute.valueType=='NUMBER'),number:true #end }}" />
-					#end
-				</td>		
-			</tr>
+			#if( $attribute )
+				#set($value = "")
+				#set($value = $patientAttributeValueMap.get($attribute.id))
+				<tr>
+					<td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory) <em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
+					<td class="input-column">
+						#if( $attribute.valueType == "bool" )
+							<select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit"> 
+								<option value="" selected="selected">[$i18n.getString( "please_select" )]</option>
+								<option value="true" #if($value=='true') selected #end>$i18n.getString( "yes" )</option>
+								<option value="false" #if($value=='false') selected #end>$i18n.getString( "no" )</option>
+							</select>                
+						#elseif( $attribute.valueType == "trueOnly" )
+							<input type='checkbox' value="true" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" #if($value=='true') checked #end> 
+						#elseif( $attribute.valueType == "date" )
+							<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class=' #validate( "default"  $attribute.mandatory )'/>
+							<script type="text/javascript">
+								datePickerValid( 'attr$attribute.id', false, false );
+							</script>                    
+						#elseif( $attribute.valueType == "combo" )  
+							<select  id="attr$attribute.id"  name="attr$attribute.id" inherit="$!attribute.inherit" class='#validate( "default"  $attribute.mandatory )'>
+								<option value="">[$i18n.getString( "please_select" )]</option>
+								#foreach ($option in $attribute.attributeOptions )
+									<option value="$option.id" #if("$value"=="$option.name") selected #end>$option.name</option>
+								#end
+							</select>
+						#else
+							<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class="{validate:{required:$attribute.mandatory #if($attribute.valueType=='NUMBER'),number:true #end }}" />
+						#end
+					</td>		
+				</tr>
+			#end
 		#end
 	#end