- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 26 Aug 2009 12:23:16 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/includes In directory hutz:/tmp/cvs-serv32048/WebContent/WEB-INF/resources/templates/includes Modified Files: Tag: dev2 macros_index.vm Log Message: added new option input types (radio, textarea, textfield, checkbox) Index: macros_index.vm =================================================================== RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/includes/Attic/macros_index.vm,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- macros_index.vm 25 Aug 2009 09:20:14 -0000 1.1.2.2 +++ macros_index.vm 26 Aug 2009 12:23:14 -0000 1.1.2.3 @@ -1,3 +1,22 @@ +#macro(createCheckbox $param) +#set($defaults = $param.getMapOfDefaultValue()) +<label><span>$param.getLongName($lang):</span> + <input type="checkbox" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end class="option_input" /> +</label> +#end + +#macro(createCheckboxList $param) +#set($defaults = $param.getMapOfDefaultValue()) +<label><span>$param.getLongName($lang):</span></label> +<span class="checkboxlist"> +#foreach ($value in $param.getMapOfValue()) + <label>$value.getLongName($lang) + <input type="checkbox" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end class="option_input" /> + </label> +#end +</span> +#end + #macro(createDropdown $param $multiple) #set($defaults = $param.getMapOfDefaultValue()) <label><span>$param.getLongName($lang):</span> @@ -9,25 +28,47 @@ </label> #end -#macro(createCheckboxList $param) +#macro(createRadio $param) #set($defaults = $param.getMapOfDefaultValue()) -<label><span>$param.getLongName($lang):</span></label> -<span class="checkboxlist"> +<label><span>$param.getLongName($lang):</span></label> +<span class="radiolist"> #foreach ($value in $param.getMapOfValue()) <label>$value.getLongName($lang) - <input type="checkbox" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end class="option_input" /> + <input type="radio" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end class="option_input" /> </label> #end </span> #end +#macro(createTextarea $param) +#set($defaults = $param.getMapOfDefaultValue()) +<label><span>$param.getLongName($lang):</span> + <textarea name="$param.getName()" class="option_input">#foreach($default in $defaults)$default.Name#end</textarea>' + +</label> +#end + +#macro(createTextfield $param) +#set($defaults = $param.getMapOfDefaultValue()) +<label><span>$param.getLongName($lang):</span> + <input type="text" name="$param.getName()" value="#foreach($default in $defaults)$default.Name#end" class="option_input" /> +</label> +#end + #macro(createParameter $param) #set($type = $param.getType()) -#if($type == "CHECKBOXLIST") +#if($type == "CHECKBOX") +#createCheckbox($param) +#elseif($type == "CHECKBOXLIST") #createCheckboxList($param) #elseif($type == "DROPDOWN") #createDropdown($param, false) #elseif($type == "DROPDOWNLIST") #createDropdown($param, true) +#elseif($type == "RADIO") +#createRadio($param, true) +#elseif($type == "TEXTAREA") +#createTextarea($param, true) +#elseif($type == "TEXTFIELD") +#createTextfield($param, true) #end #end \ No newline at end of file
Received on Wednesday, 26 August 2009 12:23:27 UTC