=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2013-06-24 05:33:13 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2013-06-24 06:01:18 +0000 @@ -1,26 +1,28 @@ -#set( $marker = 0 ) #set( $tabIndex = 1 ) #set( $hasAccess = $auth.hasAccess( "dhis-web-dataentry", "saveValue" ) ) #foreach( $section in $sections ) + #set( $categoryComboId = $sectionCombos.get( $section.id ) ) + #set( $title = $section.displayName ) -#if( $marker == 1 ) - #set( $marker = 0 ) -#else - #set( $marker = 1 ) + #renderSection($categoryComboId, {"title": $title }) #end +#macro( renderSection $categoryComboId $args ) +#if( $!args.title ) +#else +
-

$encoder.htmlEncode( $section.displayName )

+

$encoder.htmlEncode( $args.title )

+#end
- #set( $categoryComboId = $sectionCombos.get( $section.id ) ) #set( $colCount = $numberOfTotalColumns.get( $categoryComboId ) ) #set( $categories = $orderedCategories.get( $categoryComboId ) ) #set( $optionsMap = $orderedOptionsMap.get( $categoryComboId ) ) @@ -59,7 +61,7 @@ #set( $dataEntryId = "${dataElement.uid}-${optionCombo.uid}-val" ) #set( $commentId = "${dataElement.uid}-${optionCombo.uid}-comment" ) #set( $greyedField = false ) - #set( $greyedField = $greyedFields.get( "${dataElement.uid}:${optionCombo.uid}" ) ) + #set( $greyedField = $greyedFields.get( "${dataElement.uid}:${optionCombo.uid}" ) ) #if( $dataElement.type == "bool" )