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.1.6 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.5 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.4 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.3 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.2 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.1 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.1.0 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.9 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.8 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.7 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.6 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.5 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.4 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.3 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.2 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.1 app/models/inputs/effective_email/input.rb
effective_form_inputs-1.0.0 app/models/inputs/effective_email/input.rb
effective_form_inputs-0.9.8 app/models/inputs/effective_email/input.rb
effective_form_inputs-0.9.7 app/models/inputs/effective_email/input.rb
effective_form_inputs-0.9.6 app/models/inputs/effective_email/input.rb