Module: Adminterface::Extensions::Inputs::Base::Choices

Included in:
CheckBoxesInput, RadioInput
Defined in:
lib/adminterface/extensions/inputs/base/choices.rb

Instance Method Summary collapse

Instance Method Details

#choice_wrapping_html_options(choice) ⇒ Object



6
7
8
9
10
# File 'lib/adminterface/extensions/inputs/base/choices.rb', line 6

def choice_wrapping_html_options(choice)
  choice_options = super(choice)
  choice_options[:class] = "#{choice_options[:class]} #{choice_wrapping_class}".squish
  choice_options
end

#legend_htmlObject



12
13
14
15
16
17
18
# File 'lib/adminterface/extensions/inputs/base/choices.rb', line 12

def legend_html
  if render_label?
    template.(:label, label_text, label_html_options.merge(class: "form-label"))
  else
    "".html_safe
  end
end