Sha256: 8954e9aa354621875b2581c1e3599d583eb38fa6bcfebe241d5abff86acf72d4

Contents?: true

Size: 963 Bytes

Versions: 33

Compression:

Stored size: 963 Bytes

Contents

# frozen_string_literal: true

module EacRailsUtils
  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

33 entries across 33 versions & 1 rubygems

Version Path
eac_rails_utils-0.22.2 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.22.1 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.22.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.21.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.20.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.19.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.18.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.17.2 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.17.1 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.17.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.16.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.15.2 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.15.1 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.15.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.14.1 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.14.0 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.13.5 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.13.4 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.13.3 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb
eac_rails_utils-0.13.2 app/helpers/eac_rails_utils/common_form_helper/form_builder/time_field.rb