class Trestle::Form::Fields::TimeZoneSelect

Attributes

html_options[R]
priority_zones[R]

Public Class Methods

new(builder, template, name, priority_zones=nil, options={}, html_options={}, &block) click to toggle source
Calls superclass method Trestle::Form::Field::new
# File lib/trestle/form/fields/time_zone_select.rb, line 7
def initialize(builder, template, name, priority_zones=nil, options={}, html_options={}, &block)
  super(builder, template, name, options, &block)

  @priority_zones = priority_zones
  @html_options = default_html_options.merge(html_options)
end

Public Instance Methods

default_html_options() click to toggle source
# File lib/trestle/form/fields/time_zone_select.rb, line 18
def default_html_options
  Trestle::Options.new(class: ["form-control"], disabled: disabled? || readonly?, data: { enable_select2: true })
end
field() click to toggle source
# File lib/trestle/form/fields/time_zone_select.rb, line 14
def field
  builder.raw_time_zone_select(name, priority_zones, options, html_options, &block)
end