Module: Adminterface::Extensions::Inputs::Base::Groupish

Instance Method Summary collapse

Instance Method Details

#input_htmlObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/adminterface/extensions/inputs/base/groupish.rb', line 6

def input_html
  return super unless grouping?

  template. :div, class: "input-group" do
    html = []
    html.push prepend_html if prepend_html?
    html.push super
    html.push append_html if append_html?
    html.join.html_safe
  end
end

#wrapper_html_optionsObject



18
19
20
21
22
23
# File 'lib/adminterface/extensions/inputs/base/groupish.rb', line 18

def wrapper_html_options
  return super unless grouping?

  new_class = [super[:class], "input-group"].compact.join(" ")
  super.merge(class: new_class)
end