Sha256: 55741622199e29a4551a74afbb8b52db1d83165c84f21aba236f8f02add4cdaa

Contents?: true

Size: 952 Bytes

Versions: 10

Compression:

Stored size: 952 Bytes

Contents

# frozen_string_literal: true
module Eac
  module CommonFormHelper
    class FormBuilder
      module TimeField
        def time_field(field_name, options = {})
          field_options = options.extract!(:use_month_numbers, :use_two_digit_numbers,
                                           :use_short_month, :add_month_numbers, :use_month_names,
                                           :month_format_string, :date_separator, :start_year,
                                           :end_year, :discard_day, :discard_month, :discard_year,
                                           :order, :include_blank, :default, :selected, :disabled,
                                           :prompt, :with_css_classes)
          field(field_name, options) do
            @helper.content_tag(:div, @form.time_select(field_name, field_options),
                                class: 'form-control-complex')
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
eac_rails_utils-0.8.0 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.7.1 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.7.0 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.6.0 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.5.0 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.4.0 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.3.0 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.2.2 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.2.1 lib/eac/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.2.0 lib/eac/common_form_helper/form_builder/time_field.rb