Class: FormtasticBootstrap::Inputs::BooleanInput
- Inherits:
-
Formtastic::Inputs::BooleanInput
- Object
- Formtastic::Inputs::BooleanInput
- FormtasticBootstrap::Inputs::BooleanInput
- Includes:
- Base
- Defined in:
- lib/formtastic-bootstrap/inputs/boolean_input.rb
Instance Method Summary collapse
-
#empty_label ⇒ Object
Need this for formatting to work.
- #label_text_with_embedded_checkbox ⇒ Object
- #to_html ⇒ Object
Methods included from FormtasticBootstrap::Inputs::Base::Wrapping
#clearfix_div_wrapping, #generic_input_wrapping, #inline_inputs_div_wrapping, #input_div_wrapping, #wrapper_html_options
Methods included from FormtasticBootstrap::Inputs::Base::Labelling
Methods included from FormtasticBootstrap::Inputs::Base::Html
Methods included from FormtasticBootstrap::Inputs::Base::Hints
Methods included from FormtasticBootstrap::Inputs::Base::Errors
#error_first_html, #error_html, #error_list_html, #error_none_html, #error_sentence_html
Instance Method Details
#empty_label ⇒ Object
Need this for formatting to work.
27 28 29 |
# File 'lib/formtastic-bootstrap/inputs/boolean_input.rb', line 27 def empty_label template.content_tag(:label) do end end |
#label_text_with_embedded_checkbox ⇒ Object
21 22 23 24 |
# File 'lib/formtastic-bootstrap/inputs/boolean_input.rb', line 21 def # That newline matters! Why, I do no not know. check_box_html << "\n" << template.content_tag(:span) do label_text end end |
#to_html ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/formtastic-bootstrap/inputs/boolean_input.rb', line 7 def to_html clearfix_div_wrapping do empty_label << hidden_field_html << input_div_wrapping(:block) do template.content_tag(:ul, :class => "inputs-list") do template.content_tag(:li) do label_with_nested_checkbox end end end end end |