Class: FlexaFormtasticBootstrap::Inputs::CheckBoxesInput
- Inherits:
-
Formtastic::Inputs::CheckBoxesInput
- Object
- Formtastic::Inputs::CheckBoxesInput
- FlexaFormtasticBootstrap::Inputs::CheckBoxesInput
- Includes:
- Base, Base::Choices
- Defined in:
- lib/flexa_formtastic_bootstrap/inputs/check_boxes_input.rb
Instance Method Summary collapse
Methods included from Base::Choices
#choice_label, #choices_group_wrapping, #choices_group_wrapping_html_options, #choices_wrapping_html_options, #input_div_wrapping, #label_html_options, #legend_html
Methods included from Base::Wrapping
#clearfix_div_wrapping, #generic_input_wrapping, #inline_inputs_div_wrapping, #input_div_wrapping, #prepended_input_wrapping, #wrapper_html_options
Methods included from Base::Labelling
Methods included from Base::Html
Methods included from Base::Hints
Methods included from Base::Errors
#error_first_html, #error_html, #error_list_html, #error_none_html, #error_sentence_html
Instance Method Details
#choice_html(choice) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/flexa_formtastic_bootstrap/inputs/check_boxes_input.rb', line 23 def choice_html(choice) template.content_tag(:label, hidden_fields? ? check_box_with_hidden_input(choice) : check_box_without_hidden_input(choice) << choice_label(choice), .merge(:for => choice_input_dom_id(choice), :class => nil) ) end |
#to_html ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/flexa_formtastic_bootstrap/inputs/check_boxes_input.rb', line 7 def to_html clearfix_div_wrapping do legend_html << hidden_field_for_all << input_div_wrapping do choices_group_wrapping do collection.map { |choice| choice_wrapping((choice)) do choice_html(choice) end }.join("\n").html_safe end end end end |