dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18044
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7449: [mobile] change display name of data element in forms
------------------------------------------------------------
revno: 7449
committer: Long <thanhlongngo1988@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-06-28 15:44:43 +0700
message:
[mobile] change display name of data element in forms
modified:
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ModelMapping.java
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.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-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ModelMapping.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ModelMapping.java 2012-04-13 08:27:30 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ModelMapping.java 2012-06-28 08:44:43 +0000
@@ -43,14 +43,7 @@
{
DataElement de = new DataElement();
de.setId( dataElement.getId() );
-
- // Name defaults to alternative name with fallback to name if empty
- String name = dataElement.getAlternativeName();
- if ( name == null || name.trim().isEmpty() )
- {
- name = dataElement.getName();
- }
- de.setName( name );
+ de.setName( dataElement.getFormNameFallback() );
de.setType( dataElement.getType() );
de.setCategoryOptionCombos( getCategoryOptionCombos( dataElement ) );
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm 2012-04-07 10:23:28 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm 2012-06-28 08:44:43 +0000
@@ -43,16 +43,9 @@
<h3 style="text-align: left;">$sectionName</h3>
<p style="text-align: left;">
#foreach( $dataElement in $dataElements)
- #if( $dataElement.shortName )
- #set( $dataElementName = $dataElement.shortName )
- #else
- #set( $dataElementName = $dataElement.name )
- #end
-
+ #set( $dataElementName = $dataElement.getFormNameFallback() )
#set( $optionCombos = $dataElement.categoryCombo.getSortedOptionCombos() )
-
#foreach( $optionCombo in $optionCombos )
-
#if( !$greyedFields.get( "$dataElement.id:$optionCombo.id" ) )
#set( $key = "DE${dataElement.id}OC${optionCombo.id}" )