← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15614: Remove tracker-associate attributes from Add/Update program validation criteria.

 

------------------------------------------------------------
revno: 15614
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-06-11 12:53:54 +0800
message:
  Remove tracker-associate attributes from Add/Update program validation criteria.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/validationcriteria.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.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-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm	2014-06-03 12:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm	2014-06-11 04:53:54 +0000
@@ -24,11 +24,13 @@
 					<select id='property' name='property' style='width:120px' onChange="showDivValue();">
 						<option value="" selected="selected">[$i18n.getString( "please_select" )]</option>
 						#foreach($programAttribute in $program.attributes)
-							#set($opt="")
-							#foreach($option in $programAttribute.attribute.optionSet.options)
-								#set($opt=$opt + ';' + $option )
-							#end 
-							<option valuetype='$programAttribute.attribute.valueType' value="$programAttribute.attribute.uid" opt="$opt">$programAttribute.attribute.displayName</option>
+							#if( $programAttribute.attribute.valueType!='trackerAssociate')
+								#set($opt="")
+								#foreach($option in $programAttribute.attribute.optionSet.options)
+									#set($opt=$opt + ';' + $option )
+								#end 
+								<option valuetype='$programAttribute.attribute.valueType' value="$programAttribute.attribute.uid" opt="$opt">$programAttribute.attribute.displayName</option>
+							#end
 						#end
 					</select>
 				</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/validationcriteria.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/validationcriteria.js	2014-06-03 12:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/validationcriteria.js	2014-06-11 04:53:54 +0000
@@ -78,13 +78,13 @@
 		valueField += "</select>";
 	}
 	else if( type == "phoneNumber" ){
-		valueField = "<select id='value' name='value' class=\"{validate:{phone:true,required:true}}\" style=\"width:140px;\">";
+		valueField = "<input id='value' name='value' class=\"{validate:{phone:true,required:true}}\" style=\"width:140px;\" />";
 	}
 	else if( type == "age" || type == "number" ){
-		valueField = "<input id='value' name='value' class=\"{validate:{number:true,required:true}}\" style=\"width:140px;\"/>";
+		valueField = "<input id='value' name='value' class=\"{validate:{number:true,required:true}}\" style=\"width:140px;\" />";
 	}
 	else if( type == "letter" ){
-		valueField = "<select id='value' name='value' class=\"{validate:{letterswithbasicpunc:true,required:true}}\" style=\"width:140px;\">";
+		valueField = "<input id='value' name='value' class=\"{validate:{letterswithbasicpunc:true,required:true}}\" style=\"width:140px;\" />";
 	}
 	else{
 		valueField = "<input id='value' name='value' class=\"{validate:{required:true}}\" style=\"width:140px;\"/>";

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm	2014-06-03 12:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm	2014-06-11 04:53:54 +0000
@@ -28,11 +28,13 @@
 								<option value="" selected="selected">[$i18n.getString( "please_select" )]</option>
 								#set($attribute = '')
 								#foreach($programAttribute in $program.attributes)
-									#set($opt="")
-									#foreach($option in $programAttribute.attribute.optionSet.options)
-										#set($opt=$opt + ';' + $option )
-									#end 
-									<option valuetype='$programAttribute.attribute.valueType' value="$programAttribute.attribute.uid" opt="$opt" #if($validationCriteria.property==$$programAttribute.attribute.uid) #set($attribute = $$programAttribute.attribute) selected #end>$programAttribute.attribute.displayName</option>
+									#if( $programAttribute.attribute.valueType!='trackerAssociate')
+										set($opt="")
+										#foreach($option in $programAttribute.attribute.optionSet.options)
+											#set($opt=$opt + ';' + $option )
+										#end 
+										<option valuetype='$programAttribute.attribute.valueType' value="$programAttribute.attribute.uid" opt="$opt" #if($validationCriteria.property==$$programAttribute.attribute.uid) #set($attribute = $$programAttribute.attribute) selected #end>$programAttribute.attribute.displayName</option>
+									#end
 								#end
 							</select>
 						</td>