Sha256: c2071d0109c5acac643d1f47f892d0cd15872a730b9d6a5d2a1fb0f7265445b1

Contents?: true

Size: 747 Bytes

Versions: 5

Compression:

Stored size: 747 Bytes

Contents

class FormWithoutModel < Netzke::Basepack::Form
  def configure(c)
    c.items = [
      :text_field,
      {:name => :number_field, :attr_type => :integer},
      {:name => :boolean_field, :attr_type => :boolean, :input_value => true},
      {:name => :date_field, :attr_type => :date},
      # {:name => :datetime_field, :attr_type => :datetime}, #incompatible: no xtype
      {:name => :combobox_field, :xtype => :combo, :store => [[1, "One"], [2, "Two"], [3, "Three"]]},
      {:name => :time_field, :attr_type => :time },
    ]

    super
  end

  endpoint :netzke_submit do |params, this|
    data = ActiveSupport::JSON.decode(params[:data])
    this.netzke_feedback data.each_pair.map{ |k,v| "#{k.humanize}: #{v}" }.join("<br/>")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netzke-basepack-0.8.4 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.8.1 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.8.0 test/basepack_test_app/app/components/form_without_model.rb