Sha256: 6efa53b9d2babb3c089f7b0a4b474dce89590ae74293db914c802a2e878f0ff0

Contents?: true

Size: 526 Bytes

Versions: 7

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

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

require_relative './text_field_tag'

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

Liquid::Template.register_tag('password_field', PasswordFieldTag)

Version data entries

7 entries across 7 versions & 1 rubygems

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