Sha256: d189c94618203183a95df2673c1ff7a26fd5bc6dbb2cea78084d1bb2486214e3

Contents?: true

Size: 446 Bytes

Versions: 3

Compression:

Stored size: 446 Bytes

Contents

class TextInput < SimpleForm::Inputs::TextInput
  def label_input
    content = "".html_safe
    [ :input, :error, :hint ].each do |component|
      next if options[component] == false
      rendered = send(component)
      content.safe_concat rendered.to_s if rendered
    end
    (options[:label] == false ? "" : label) + "<div class=\"input\">#{content}</div>".html_safe
  end

  def input_html_classes
    super.unshift("xxlarge")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bootstrap-generators-1.4.0 lib/generators/bootstrap/install/templates/app/inputs/text_input.rb
bootstrap-generators-1.0.1 lib/generators/bootstrap/install/templates/app/inputs/text_input.rb
bootstrap-generators-1.0.0 lib/generators/bootstrap/install/templates/app/inputs/text_input.rb