Sha256: dba91085b84a89bc794cfe9f3d04ab238cac01e4ba42dcef51d07e5bee95701e

Contents?: true

Size: 557 Bytes

Versions: 10

Compression:

Stored size: 557 Bytes

Contents

module BulmaFormBuilder
  module Inputs
    module DateField
      extend ActiveSupport::Concern

      include Base

      included do
        def date_field_with_bulma(name, options = {})
          form_field_builder(name, options) do
            classes = [options[:class]]
            classes <<= 'input'
            classes <<= 'is-danger' if error?(name)
            options[:class] = classes.compact.join(' ')

            date_field_without_bulma(name, options)
          end
        end

        bulma_alias :date_field
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bulma_form_builder-0.4.3 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.4.2 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.4.1 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.4.0 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.3.1 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.3.0 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.2.1 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.2.0 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.1.1 lib/bulma_form_builder/inputs/date_field.rb
bulma_form_builder-0.1.0 lib/bulma_form_builder/inputs/date_field.rb