dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14009
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4608: made attributeOptions display correct
------------------------------------------------------------
revno: 4608
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-09-16 18:17:03 +0200
message:
made attributeOptions display correct
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.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-commons-resources/src/main/webapp/macros.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2011-09-16 15:55:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2011-09-16 16:17:03 +0000
@@ -207,7 +207,7 @@
</tr>
#end
-#macro( trMultipleSelectInput $text $name $choices )
+#macro( trMultipleChoiceInput $text $name $choices )
<tr>
<td style="width: 200px;">$text</td>
<td>
@@ -241,7 +241,12 @@
#elseif( $attribute.valueType == "negative_integer" )
#trNegativeIntegerInput( $attribute.name "negativeIntegerAttribute" )
#elseif( $attribute.valueType == "multiple_choice" )
- #trMultipleSelectInput( $attribute.name "multipleSelectAttribute" [ "One", "Two", "Three" ] )
+ #set( $attributeOptions = [] )
+ #foreach( $attributeOption in $attribute.attributeOptions )
+ #set( $return = $attributeOptions.add( $attributeOption.name ) )
+ #end
+
+ #trMultipleChoiceInput( $attribute.name "multipleChoiceAttribute" $attributeOptions )
#end
#end
</table>