Source

webwork / src / java / template / simple / checkbox.vm

#*
  -- checkbox.vm
  --
  -- Required Parameters:
  --   * label       - The description that will be used to identfy the control
  --   * name        - The name of the attribute to put and pull the result from
  --                   Equates to the NAME parameter of the HTML INPUT tag
  --   * fieldValue  - The value displayed by the control.  Equates to the value
  --                   of the HTML INPUT tag
  --
  -- Optional Parameters:
  --   * disabled        - DISABLED parameter of the HTML INPUT tag
  --   * tabindex        - tabindex parameter of the HTML INPUT tag
  --   * onchange        - onkeyup parameter of the HTML INPUT tag
*#
<input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($parameters.fieldValue)"
#if ($parameters.nameValue)        checked="true"                                           #end
#if ($parameters.disabled == true) disabled="disabled"                                      #end
#if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
#if ($parameters.onchange)         onchange="$!webwork.htmlEncode($parameters.onchange)"    #end
#if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
#if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end
#if ($parameters.cssStyle)         style="$!webwork.htmlEncode($parameters.cssStyle)"       #end
/>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.