Sha256: 42c7b74f8bc656ac98d2817937279a5e5735e084b3873ff82295a8aaf08eb1e8
Contents?: true
Size: 957 Bytes
Versions: 23
Compression:
Stored size: 957 Bytes
Contents
module FlexaFormtasticBootstrap module Inputs class CheckBoxesInput < Formtastic::Inputs::CheckBoxesInput include Base include Base::Choices 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_wrapping_html_options(choice)) do choice_html(choice) end }.join("\n").html_safe end end end end 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), label_html_options.merge(:for => choice_input_dom_id(choice), :class => nil) ) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems