Sha256: 57f1dc292523dad7fba1b47e6634bfe00168d4423655808bd43fe0a5c5a7b8c9

Contents?: true

Size: 823 Bytes

Versions: 9

Compression:

Stored size: 823 Bytes

Contents

class FormWithoutModel < Netzke::Basepack::FormPanel
  def configuration
    super.merge(
      # :file_upload => true, # incompatible
      :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 },
      ]
     )
  end

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

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
netzke-basepack-0.7.7 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-zh-0.7.6 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.6 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.5 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.4 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.3 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.2 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.1 test/basepack_test_app/app/components/form_without_model.rb
netzke-basepack-0.7.0 test/rails_app/app/components/form_without_model.rb