Sha256: 60f9425d18714f79fd2f7696aa1b45ec9ddcdc9a005ef65181933482a37b580d

Contents?: true

Size: 682 Bytes

Versions: 5

Compression:

Stored size: 682 Bytes

Contents

class UserForm < Netzke::Basepack::Form
  def configure(c)
    c.record = User.first

    super

    c.model = "User"
    c.title = User.model_name.human
    c.items = [
      {:xtype => 'fieldset', :title => "Basic Info", :checkboxToggle => true, :items => [
        :first_name,
        {:name => :last_name}
      ]},
      {:xtype => 'fieldset', :title => "Timestamps", :items => [
        {:name => :created_at, :disabled => true},
        {:name => :updated_at, :disabled => true}
      ]},
      { name: :role__name, empty_text: "Select a role" }
    ]
  end

  # Uncomment for visual mask testing
  # def netzke_submit_endpoint(params)
  #   sleep 2
  #   super
  # 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/user_form.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/components/user_form.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/components/user_form.rb
netzke-basepack-0.8.1 test/basepack_test_app/app/components/user_form.rb
netzke-basepack-0.8.0 test/basepack_test_app/app/components/user_form.rb