Sha256: 589bc2c0b0b2075bc8d3f1118d2ac25716e54217310a404b26c1072e3423db09

Contents?: true

Size: 507 Bytes

Versions: 7

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

# Add a email-field, either specifying everything manually or using a model object on the form
#
# == Basic usage:
#    {%email_field name:"email" value:"1"%}
#
# == Advanced usage:
#    {%email_field email%}
#
# This last usage requires a model on the form
#

require_relative './text_field_tag'

class EmailFieldTag < TextFieldTag
  def initialize(tag, args, tokens)
    super
    @field_type = 'email'
  end
end

Liquid::Template.register_tag('email_field', EmailFieldTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 lib/scribo/liquid/tags/email_field_tag.rb
scribo-1.0.43 lib/scribo/liquid/tags/email_field_tag.rb
scribo-1.0.42 lib/scribo/liquid/tags/email_field_tag.rb
scribo-1.0.41 lib/scribo/liquid/tags/email_field_tag.rb
scribo-1.0.40 lib/scribo/liquid/tags/email_field_tag.rb
scribo-1.0.39 lib/scribo/liquid/tags/email_field_tag.rb
scribo-1.0.38 lib/scribo/liquid/tags/email_field_tag.rb