Sha256: 4d01898bdb176c9e778d8fdb6049973c05117b9613f1cc80f0db2b1d00571ae2

Contents?: true

Size: 1.41 KB

Versions: 279

Compression:

Stored size: 1.41 KB

Contents

# frozen_string_literal: true

module Playbook
  module Forms
    class Builder < ::ActionView::Helpers::FormBuilder
      require_relative "builder/action_area"
      require_relative "builder/checkbox_field"
      require_relative "builder/collection_select_field"
      require_relative "builder/date_picker_field"
      require_relative "builder/form_field_builder"
      require_relative "builder/select_field"
      require_relative "builder/typeahead_field"
      require_relative "builder/intl_telephone_field"
      require_relative "builder/multi_level_select_field"

      prepend(FormFieldBuilder.new(:email_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:number_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:search_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:telephone_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:text_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:password_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:url_field, kit_name: "text_input"))
      prepend(FormFieldBuilder.new(:text_area, kit_name: "textarea"))

      def actions
        context = @template.respond_to?(:view_context) ? @template.view_context : @template
        context.content_tag :ol, class: "pb-form-actions" do
          yield ActionArea.new(@template, submit_default_value)
        end
      end
    end
  end
end

Version data entries

279 entries across 279 versions & 1 rubygems

Version Path
playbook_ui-13.16.0.pre.alpha.powercentrainplaybookpt22125 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2107 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR181stripedtable2103 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2100 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR184betaflaginmenuyml2085 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR178AdvancedTableDocs2072 lib/playbook/forms/builder.rb
playbook_ui-13.17.0 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2060 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2038 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2037 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.nodejsupgrade2036 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2035 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2034 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2023 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2010 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PLAY11642006 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary1995 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary1993 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PLAY11641992 lib/playbook/forms/builder.rb
playbook_ui-13.16.0.pre.alpha.PLAY11641991 lib/playbook/forms/builder.rb