← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2271: Fixed bug <683463> Unable filter "data elements" in Unicode characters.

 

------------------------------------------------------------
revno: 2271
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-12-03 15:08:32 +0700
message:
  Fixed bug <683463> Unable filter "data elements" in Unicode characters.
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	2010-11-25 21:34:02 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm	2010-12-03 08:08:32 +0000
@@ -108,21 +108,21 @@
 
 #macro( organisationUnitSelectionTree $cleanAll $multipleSelectionAllowed $requied )
 #if( $multipleSelectionAllowed ==true )
-	#parse( "/dhis-web-commons/oust/selectionTreeMultipleSelect.vm" )		
+	#parse( "/dhis-web-commons/oust/selectionTreeMultipleSelect.vm" )
 #else
 	#parse( "/dhis-web-commons/oust/selectionTreeSingleSelect.vm" )
 #end	
 #end
 
 #macro( filterDiv $action )
-$i18n.getString( "filter_by_name" ):	
-<div style="inline">
-	<input type="text" id="key" value="$!{key}">
-	<input type="button" value="$i18n.getString( 'filter' )" onclick="filterInternal()"/>	
-	<input type="button" value="$i18n.getString( 'clear' )" onclick="clearInternal()"/>		
-</div>
-<script>
-function filterInternal() { window.location.href="${action}.action?key=" + $( '#key' ).val(); }
-function clearInternal() { window.location.href="${action}.action"; }
-</script>
+$i18n.getString( "filter_by_name" ):
+<form action="${action}.action" method="POST">
+	<div style="inline">
+		#set ($value = $encoder.htmlEncode( ${key} ))
+		<input type="text" id="key" name="key" value="$!value"/>
+		<input type="submit" value="$i18n.getString( 'filter' )"/>
+		<input type="button" value="$i18n.getString( 'clear' )" 
+		onclick="window.location.href='${action}.action'"/>
+	</div>
+</form>
 #end