Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 68c385e8d7
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (26 sloc) 0.77 kb
# TODO See if this can be refactored to make use of some of the Choices code.
module FormtasticBootstrap
module Inputs
class BooleanInput < Formtastic::Inputs::BooleanInput
include Base
def to_html
control_group_wrapping do
(options[:label_outside] ? control_label_html : "".html_safe) <<
hidden_field_html <<
controls_wrapping do
label_with_nested_checkbox
end
end
end
def label_with_nested_checkbox
builder.label(
method,
options[:label_outside] ? check_box_html : label_text_with_embedded_checkbox,
label_html_options.tap do |options|
options[:class] << "checkbox"
end
)
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.