Sha256: 2c084924900684996ab471027cf32c968472594864943ad8d201997315674b1a

Contents?: true

Size: 492 Bytes

Versions: 17

Compression:

Stored size: 492 Bytes

Contents

module Locomotive
  class SmallCodeInput < Formtastic::Inputs::TextInput

    def wrapper_html_options
      super.tap do |opts|
        opts[:class] += ' code small'
      end
    end

    def input_wrapping(&block)
      template.content_tag(:li,
        [template.capture(&block), error_html, error_anchor, hint_html].join("\n").html_safe,
        wrapper_html_options
      )
    end

    def error_anchor
      template.content_tag(:span, '', :class => 'error-anchor')
    end

  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
locomotive_cms-2.0.3 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.2 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.1 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0 app/inputs/locomotive/small_code_input.rb
tribeca_cms-0.1.1 app/inputs/locomotive/small_code_input.rb
tribeca_cms-2.0.0.rc12 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc12 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc11 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc10 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc9 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc8 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc7 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc6 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc5 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc4 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc2 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.0.0.rc1 app/inputs/locomotive/small_code_input.rb