Sha256: 9a0583812bb3ac93ac4635a88cad63101d1b9e8acd6fe3c28317b45771c02929
Contents?: true
Size: 1.1 KB
Versions: 10
Compression:
Stored size: 1.1 KB
Contents
module FlexaFormtasticBootstrap 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 def legend_html if render_label? template.content_tag(:label, label_text,:class => "label_radio") else "".html_safe end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems