Sha256: 9fa724cddefc516931483797842600e05d573bd95296c791cf2c4a1609c7fc23

Contents?: true

Size: 498 Bytes

Versions: 7

Compression:

Stored size: 498 Bytes

Contents

# frozen_string_literal: true

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

require_relative './text_field_tag'

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

Liquid::Template.register_tag('time_field', TimeFieldTag)

Version data entries

7 entries across 7 versions & 1 rubygems

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