Sha256: 9051efc1cf36c413ded40dab6a7be8c5448de8858ee8490e93899d28e8d6d525
Contents?: true
Size: 1.1 KB
Versions: 22
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true module Playbook module PbForm module FormBuilder extend ActiveSupport::Concern included do 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")) prepend(TypeaheadField) prepend(SelectField) prepend(CollectionSelectField) prepend(CheckboxField) prepend(DatePickerField) end def actions @template.send(:view_context).content_tag :ol, class: "pb-form-actions" do yield ActionArea.new(@template, submit_default_value) end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems