Sha256: 95d137d3d9ad3cbdec1f8bbc0a3d5b7b2414215670c6c4ddfbc2a57dcd5c40c8
Contents?: true
Size: 931 Bytes
Versions: 12
Compression:
Stored size: 931 Bytes
Contents
module FormtasticBootstrap module Inputs class RadioInput < Formtastic::Inputs::RadioInput include Base include Base::Choices def to_html clearfix_div_wrapping do legend_html << 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, label_html_options.merge(:for => choice_input_dom_id(choice), :class => nil)) do builder.radio_button(input_name, choice_value(choice), input_html_options.merge(choice_html_options(choice)).merge(:required => false)) << choice_label(choice) end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems