Sha256: db46dcfcb30bb3fbfea58d901c443942f7cc4ce83acfdabb2411954e4e17f2a8
Contents?: true
Size: 931 Bytes
Versions: 6
Compression:
Stored size: 931 Bytes
Contents
module FlexaFormtasticBootstrap module Inputs class BooleanInput < Formtastic::Inputs::BooleanInput include Base def to_html #options[:boolean][:class] = 'checkbox' #label_html_options 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 def label_text_with_embedded_checkbox # That newline matters! Why, I do no not know. check_box_html << "\n" << template.content_tag(:span) do label_text end end # Need this for formatting to work. def empty_label template.content_tag(:label) do end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems