]> git.proxmox.com Git - extjs.git/blob - extjs/examples/kitchensink/classic/samples/view/form/CheckboxGroupFormController.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / form / CheckboxGroupFormController.js
1 Ext.define('KitchenSink.view.form.CheckboxGroupController', {
2 extend: 'Ext.app.ViewController',
3 alias: 'controller.form-checkboxgroup',
4
5 onSaveFormClick: function() {
6 var form = this.getView().getForm();
7
8 if (form.isValid()) {
9 Ext.Msg.alert({
10 title: 'Submitted Values',
11 message: 'The following will be sent to the server: <br />' +
12 form.getValues(true).replace(/&/g,', '),
13 height: 200
14 });
15 }
16 else {
17 Ext.Msg.alert(
18 'Form incomplete',
19 'You must fill out the form with valid values, <br/ >' +
20 'including the (initially collapsed) Checkbox group.'
21 );
22 }
23 },
24
25 onResetFormClick: function() {
26 this.getView().getForm().reset();
27 }
28 });