W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/WebContent/WEB-INF/resources/templates/includes macros_index.vm,1.17,1.18

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 22 Oct 2009 17:04:26 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1N115O-0003K0-Iz@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/includes
In directory hutz:/tmp/cvs-serv12754/WebContent/WEB-INF/resources/templates/includes

Modified Files:
	macros_index.vm 
Log Message:
bookmarkable radiolist status

Index: macros_index.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/includes/macros_index.vm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- macros_index.vm	22 Oct 2009 16:26:18 -0000	1.17
+++ macros_index.vm	22 Oct 2009 17:04:24 -0000	1.18
@@ -122,11 +122,17 @@
 #macro(createRadio $param)
 #if ($param.getLongName($lang)) #set($param_name=$param.getLongName($lang)) #else #set($param_name=$param.getName()) #end
 #set($defaults = $param.getMapOfDefaultValue())
+#set( $D = '$' )
+#set ($a = "${D}!{param_${param.Name}}")
+#set ($paramValue = "#evaluate ($a)")
 <label><span>$param_name</span></label>
 <span class="radiolist">
 #foreach ($value in $param.getMapOfValue())
-	<label>$value.getLongName($lang)
-		<input type="radio" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end class="option_input" />
+#set ($s = '')
+#if (($paramValue != "" && $paramValue.contains($value.Name)) || ($paramValue == "" && $defaults.containsKey($value.getName()))) #set ($s = 'checked="checked"') #end
+	<label>
+		<input type="radio" name="$param.getName()" value="$value.getName()" $s class="option_input" />
+		$value.getLongName($lang)
 	</label>
 #end
 </span>
Received on Thursday, 22 October 2009 17:04:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC