jsonAttributeValues )
@@ -228,6 +238,10 @@
{
trackedEntityAttribute.setOptionSet( optionService.getOptionSet( optionSetId ) );
}
+ else if ( valueType.equals( TrackedEntityAttribute.TYPE_TRACKER_ASSOCIATE ) )
+ {
+ trackedEntityAttribute.setTrackedEntity( trackedEntityService.getTrackedEntity( trackedEntityId ) );
+ }
if ( legendSetId != null )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml 2015-03-19 11:14:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml 2015-04-08 04:43:57 +0000
@@ -368,7 +368,7 @@
/dhis-web-maintenance-program/programStageList.vm
javascript/programStage.js
-
+
/main.vm
@@ -377,7 +377,7 @@
style/basic.css
F_PROGRAMSTAGE_ADD
-
+
programStage.action?id=${id}
@@ -814,8 +814,8 @@
plainTextError
-
-
/dhis-web-maintenance-program/jsonOptions.vm
@@ -959,9 +959,10 @@
- /dhis-web-commons/ajax/jsonResponseSuccess.vm
-
- /dhis-web-commons/ajax/jsonResponseError.vm
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm
+
+
+ /dhis-web-commons/ajax/jsonResponseError.vm
plainTextError
@@ -1075,7 +1076,8 @@
class="org.hisp.dhis.trackedentity.action.programindicator.GetProgramIndicatorDescriptionAction">
/dhis-web-commons/ajax/jsonResponseSuccess.vm
-
+
+
/dhis-web-commons/ajax/jsonResponseError.vm
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2015-03-19 09:29:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2015-04-08 04:43:57 +0000
@@ -91,7 +91,7 @@
-
+
@@ -102,16 +102,27 @@
|
-
+
+
|
|
+
+ |
+
+ |
+
+
|
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js 2014-07-02 12:11:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js 2015-04-08 04:43:57 +0000
@@ -82,19 +82,25 @@
function typeOnChange() {
var type = getFieldValue('valueType');
- if( type=="optionSet"){
+
+ hideById("optionSetRow");
+ disable("optionSetId");
+ hideById("trackedEntityRow");
+ disable("trackedEntityId");
+
+ if( type == "optionSet" ) {
showById("optionSetRow");
enable("optionSetId");
}
- else{
- hideById("optionSetRow");
- disable("optionSetId");
+ else if( type == "trackerAssociate" ) {
+ showById("trackedEntityRow");
+ enable("trackedEntityId");
}
-
- if( type=="number" || type=='string' || type=='letter' || type=='phoneNumber' ){
+
+ if( type == "number" || type == 'string' || type == 'letter' || type == 'phoneNumber' ) {
enable("unique");
}
- else{
+ else {
disable("unique");
}
}
@@ -119,4 +125,3 @@
jQuery('#valueType [value=optionSet]').show();
}
}
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2015-03-19 09:29:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2015-04-08 04:43:57 +0000
@@ -87,19 +87,19 @@
-
+
-
+
-
-
-
+
+
+
|
-
-
+
+
|
|
-
+
+
+ |
+
+ |
+
+
|
|