Sha256: 0c85b0d8e88faee4612d720702c37a3265d185f58dcf8d375d07ea4d4b2d4045

Contents?: true

Size: 736 Bytes

Versions: 42

Compression:

Stored size: 736 Bytes

Contents

module Inputs
  module EffectiveEmail
    class Input < Effective::FormInput
      delegate :content_tag, :email_field_tag, :to => :@template

      def default_input_html
        {
          class: 'effective_email email',
          placeholder: 'someone@example.com',
        }
      end

      def to_html
        if options[:input_group] == false
          return email_field_tag(field_name, value, tag_options)
        end

        content_tag(:div, class: 'input-group') do
          content_tag(:span, class: 'input-group-addon') do
            content_tag(:i, '', class: 'glyphicon glyphicon-envelope').html_safe
          end +
          email_field_tag(field_name, value, tag_options)
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
effective_form_inputs-1.3.0 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.9 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.8 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.7 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.6 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.5 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.4 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.3 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.2 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.1 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.2.0 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.15 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.14 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.13 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.12 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.11 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.10 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.9 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.8 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.7 app/models/inputs/effective_email/input.rb