Sha256: e769aa53ba45ea3362273f966d22b83ddbe6f1aca4ff23e0f425604752820094

Contents?: true

Size: 489 Bytes

Versions: 26

Compression:

Stored size: 489 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

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.6 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.6.rc2 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.6.rc1 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.5 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.4 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.3 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.2 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.1 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.0 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.0.rc3 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.0.rc2 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.5.0.rc1 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.4.1 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.4.0 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.3.1 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.3.0 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.2.3 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.2.2 app/inputs/locomotive/small_code_input.rb
locomotive_cms-2.2.1 app/inputs/locomotive/small_code_input.rb