]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * Demonstrates a simple registration form.\r | |
3 | */\r | |
4 | Ext.define('KitchenSink.view.form.RegisterForm', {\r | |
5 | extend: 'Ext.form.Panel',\r | |
6 | xtype: 'form-register',\r | |
7 | \r | |
8 | //<example>\r | |
9 | requires: [\r | |
10 | 'KitchenSink.model.State',\r | |
11 | 'KitchenSink.store.States'\r | |
12 | ],\r | |
13 | \r | |
14 | exampleTitle: 'Registration Form',\r | |
15 | otherContent: [{\r | |
16 | type: 'Store',\r | |
17 | path: 'classic/samples/store/States.js'\r | |
18 | }, {\r | |
19 | type: 'Model',\r | |
20 | path: 'classic/samples/model/State.js'\r | |
21 | }],\r | |
22 | //</example>\r | |
23 | \r | |
24 | frame: true,\r | |
25 | title: 'Register',\r | |
26 | bodyPadding: 10,\r | |
27 | scrollable:true,\r | |
28 | width: 355,\r | |
29 | \r | |
30 | fieldDefaults: {\r | |
31 | labelAlign: 'right',\r | |
32 | labelWidth: 115,\r | |
33 | msgTarget: 'side'\r | |
34 | },\r | |
35 | \r | |
36 | items: [{\r | |
37 | xtype: 'fieldset',\r | |
38 | title: 'User Info',\r | |
39 | defaultType: 'textfield',\r | |
40 | defaults: {\r | |
41 | anchor: '100%'\r | |
42 | },\r | |
43 | \r | |
44 | items: [\r | |
45 | { allowBlank:false, fieldLabel: 'User ID', name: 'user', emptyText: 'user id' },\r | |
46 | { allowBlank:false, fieldLabel: 'Password', name: 'pass', emptyText: 'password', inputType: 'password' },\r | |
47 | { allowBlank:false, fieldLabel: 'Verify', name: 'pass', emptyText: 'password', inputType: 'password' }\r | |
48 | ]\r | |
49 | }, {\r | |
50 | xtype: 'fieldset',\r | |
51 | title: 'Contact Information',\r | |
52 | \r | |
53 | defaultType: 'textfield',\r | |
54 | defaults: {\r | |
55 | anchor: '100%'\r | |
56 | },\r | |
57 | \r | |
58 | items: [{\r | |
59 | fieldLabel: 'First Name',\r | |
60 | emptyText: 'First Name',\r | |
61 | name: 'first'\r | |
62 | }, {\r | |
63 | fieldLabel: 'Last Name',\r | |
64 | emptyText: 'Last Name',\r | |
65 | name: 'last'\r | |
66 | }, {\r | |
67 | fieldLabel: 'Company',\r | |
68 | name: 'company'\r | |
69 | }, {\r | |
70 | fieldLabel: 'Email',\r | |
71 | name: 'email',\r | |
72 | vtype: 'email'\r | |
73 | }, {\r | |
74 | xtype: 'combobox',\r | |
75 | fieldLabel: 'State',\r | |
76 | name: 'state',\r | |
77 | store: {\r | |
78 | type: 'states'\r | |
79 | },\r | |
80 | valueField: 'abbr',\r | |
81 | displayField: 'state',\r | |
82 | typeAhead: true,\r | |
83 | queryMode: 'local',\r | |
84 | emptyText: 'Select a state...'\r | |
85 | }, {\r | |
86 | xtype: 'datefield',\r | |
87 | fieldLabel: 'Date of Birth',\r | |
88 | name: 'dob',\r | |
89 | allowBlank: false,\r | |
90 | maxValue: new Date()\r | |
91 | }]\r | |
92 | }],\r | |
93 | \r | |
94 | buttons: [{\r | |
95 | text: 'Register',\r | |
96 | disabled: true,\r | |
97 | formBind: true\r | |
98 | }]\r | |
99 | });\r |