Sha256: 23c12ee85a88f02b28092e14a12db403866962abeafb36a8be09ff59840d8fa9
Contents?: true
Size: 433 Bytes
Versions: 2
Compression:
Stored size: 433 Bytes
Contents
require 'nitro/control/attribute' module Nitro # A Control used to edit boolean attributes. class CheckboxControl < AttributeControl setting :style, :default => '', :doc => 'The default style' def render checked = @value == true ? ' checked="checked"' : '' %{ <input type="checkbox" id="#{@attribute}_ctl" name="#{@attribute}" #{emit_style}#{checked}#{emit_disabled} /> #{emit_label} } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.41.0 | lib/nitro/control/attribute/checkbox.rb |
nitro-0.40.0 | lib/nitro/control/attribute/checkbox.rb |