Class: HorizontalBootstrapFormBuilder
Instance Method Summary
collapse
#bootstrap_fields_for, create_tagged_field, #cw_image_tag, #datetime_select, #image, #radio, #select
Instance Method Details
#bootstrap_checkbox(name, input) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/helpers/horizontal_bootstrap_form_builder.rb', line 11
def bootstrap_checkbox(name, input)
@template.content_tag("div",
@template.content_tag("div",
@template.content_tag("div",
raw("<label>#{@template.label_tag(name, input)} #{name.to_s.humanize}</label>"),
{:class => "checkbox"}
),
{:class => "col-sm-offset-4 col-sm-8"}
),
{:class => "form-group"}
)
end
|
3
4
5
6
7
8
9
|
# File 'app/helpers/horizontal_bootstrap_form_builder.rb', line 3
def bootstrap_input(name, input, include_br = false)
@template.content_tag("div",
@template.label_tag(name, nil, :class => "col-sm-4 control-label") +
@template.content_tag("div", input, {:class => "col-sm-8"}),
{:class => "form-group"}
)
end
|