getLegendSets()
+ {
+ return legendSets;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -135,6 +147,8 @@
optionSets = new ArrayList<>( optionService.getAllOptionSets() );
+ legendSets = legendService.getAllLegendSets();
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java 2015-02-19 09:18:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java 2015-02-24 21:48:22 +0000
@@ -29,6 +29,7 @@
*/
import org.apache.commons.lang3.StringUtils;
+import org.hisp.dhis.legend.LegendService;
import org.hisp.dhis.option.OptionService;
import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
@@ -67,6 +68,9 @@
@Autowired
private PeriodService periodService;
+ @Autowired
+ private LegendService legendService;
+
// -------------------------------------------------------------------------
// Input/Output
// -------------------------------------------------------------------------
@@ -127,6 +131,13 @@
this.optionSetId = optionSetId;
}
+ private Integer legendSetId;
+
+ public void setLegendSetId( Integer legendSetId )
+ {
+ this.legendSetId = legendSetId;
+ }
+
private Boolean inherit;
public void setInherit( Boolean inherit )
@@ -204,6 +215,11 @@
attribute.setOptionSet( optionService.getOptionSet( optionSetId ) );
}
+ if ( legendSetId != null )
+ {
+ attribute.setLegendSet( legendService.getLegendSet( legendSetId ) );
+ }
+
attributeService.updateTrackedEntityAttribute( attribute );
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2015-02-16 17:57:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2015-02-24 21:48:22 +0000
@@ -27,6 +27,7 @@
edit_tracked_entity_attribute=Edit tracked entity attribute
attribute=Attribute
value_type=Value type
+legend_set=Legend set
create_new_tracked_entity_attribute=Create new tracked entity attribute
confirm_delete_tracked_entity_attribute=Are you sure you want to delete this tracked entity attribute?
tracked_entity_attribute_management=Tracked entity attribute management
=== 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 2014-09-08 10:02:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2015-02-24 21:48:22 +0000
@@ -97,6 +97,17 @@
+
+ |
+
+
+ |
+
=== 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 2014-11-03 13:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2015-02-24 21:48:22 +0000
@@ -88,12 +88,23 @@
|
|
+
+ |
+
+
+ |
+