Sha256: 7e0d43e802afdb3c65d4c068f2ac03593cdaef2cb13d6a56f7b154bb26be7939
Contents?: true
Size: 698 Bytes
Versions: 17
Compression:
Stored size: 698 Bytes
Contents
module TaoForm module Inputs class NumericInput < ::SimpleForm::Inputs::NumericInput def input(wrapper_options = nil) origin_input = super prefix = options[:prefix].present? ? @builder.label(@attribute_name, options[:prefix], class: 'prefix') : '' suffix = options[:suffix].present? ? @builder.label(@attribute_name, options[:suffix], class: 'suffix') : '' field_class = ['text-field'] field_class << 'text-field-with-prefix' if prefix.present? field_class << 'text-field-with-suffix' if suffix.present? template.content_tag(:div, "#{prefix}#{origin_input}#{suffix}".html_safe, class: field_class) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems