Pman.Dialog.XtupleVendorEdit.bjs
[Pman.Xtuple] / Pman.Dialog.XtupleVendorEdit.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Dialog.XtupleVendorEdit = {
6
7     dialog : false,
8     callback:  false,
9
10     show : function(data, cb)
11     {
12         if (!this.dialog) {
13             this.create();
14         }
15
16         this.callback = cb;
17         this.data = data;
18         this.dialog.show(this.data._el);
19         if (this.form) {
20            this.form.reset();
21            this.form.setValues(data);
22            this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
23         }
24
25     },
26
27     create : function()
28     {
29         var _this = this;
30         this.dialog = Roo.factory({
31             xtype: 'LayoutDialog',
32             xns: Roo,
33             listeners : {
34                 show : function (_self)
35                 {
36                     this.layout.getRegion('center').showPanel(0);
37                 }
38             },
39             closable : false,
40             collapsible : false,
41             height : 550,
42             modal : true,
43             resizable : false,
44             title : "Edit / Create Vendor",
45             width : 550,
46             items : [
47                 {
48                     xtype: 'ContentPanel',
49                     xns: Roo,
50                     region : 'center',
51                     title : "Details",
52                     items : [
53                         {
54                             xtype: 'Form',
55                             xns: Roo.form,
56                             listeners : {
57                                 actioncomplete : function(_self,action)
58                                 {
59                                     if (action.type == 'setdata') {
60                                         if(_this.data.vend_id){
61                                             _this.dialog.el.mask("Loading");
62                                             this.load({ method: 'GET', params: { '_id' : _this.data.vend_id }});     
63                                         }
64                                        
65                                        return;
66                                     }
67                                     if (action.type == 'load') {
68                                         _this.data = action.result.data;
69                                         _this.form.findField('addr_view').sync();
70                                         _this.dialog.el.unmask();
71                                         return;
72                                     }
73                                     if (action.type =='submit') {
74                                     
75                                         _this.dialog.el.unmask();
76                                         _this.dialog.hide();
77                                     
78                                          if (_this.callback) {
79                                             _this.callback.call(_this, _this.form.getValues());
80                                          }
81                                          _this.form.reset();
82                                          return;
83                                     }
84                                 },
85                                 rendered : function (form)
86                                 {
87                                     _this.form= form;
88                                 }
89                             },
90                             method : 'POST',
91                             style : 'margin:10px;',
92                             url : baseURL + '/Roo/vendinfo.php',
93                             items : [
94                                 {
95                                     xtype: 'FieldSet',
96                                     xns: Roo.form,
97                                     legend : "Basic Details",
98                                     style : 'width:450px',
99                                     items : [
100                                         {
101                                             xtype: 'TextField',
102                                             xns: Roo.form,
103                                             listeners : {
104                                                 keyup : function (_self, e)
105                                                 {
106                                                     if (!(_this.form.findField('vend_id').getValue() * 1)) {
107                                                     
108                                                         _this.form.findField('vend_number').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
109                                                     
110                                                     }
111                                                 }
112                                             },
113                                             allowBlank : false,
114                                             fieldLabel : 'Name',
115                                             name : 'vend_name',
116                                             width : 200
117                                         },
118                                         {
119                                             xtype: 'TextField',
120                                             xns: Roo.form,
121                                             allowBlank : false,
122                                             fieldLabel : 'Vendor #',
123                                             name : 'vend_number',
124                                             readOnly : true,
125                                             width : 200
126                                         },
127                                         {
128                                             xtype: 'TextField',
129                                             xns: Roo.form,
130                                             allowBlank : true,
131                                             fieldLabel : 'Ship Via',
132                                             name : 'vend_shipvia',
133                                             width : 200
134                                         },
135                                         {
136                                             xtype: 'ComboBox',
137                                             xns: Roo.form,
138                                             allowBlank : false,
139                                             alwaysQuery : true,
140                                             displayField : 'curr_symbol',
141                                             editable : false,
142                                             emptyText : "Select Currency",
143                                             fieldLabel : 'Currency',
144                                             forceSelection : true,
145                                             hiddenName : 'vend_curr_id',
146                                             listWidth : 400,
147                                             loadingText : "Searching...",
148                                             minChars : 2,
149                                             name : 'vend_curr_id_curr_symbol',
150                                             pageSize : 20,
151                                             qtip : "Select Currency",
152                                             queryParam : 'query[curr_symbol]',
153                                             selectOnFocus : true,
154                                             tpl : '<div class="x-grid-cell-text x-btn button"><b>{curr_symbol}</b> </div>',
155                                             triggerAction : 'all',
156                                             typeAhead : true,
157                                             valueField : 'curr_id',
158                                             width : 200,
159                                             store : {
160                                                 xtype: 'Store',
161                                                 xns: Roo.data,
162                                                 listeners : {
163                                                     beforeload : function (_self, o){
164                                                         o.params = o.params || {};
165                                                     }
166                                                 },
167                                                 remoteSort : true,
168                                                 sortInfo : { direction : 'ASC', field: 'curr_symbol' },
169                                                 proxy : {
170                                                     xtype: 'HttpProxy',
171                                                     xns: Roo.data,
172                                                     method : 'GET',
173                                                     url : baseURL + '/Roo/curr_symbol.php'
174                                                 },
175                                                 reader : {
176                                                     xtype: 'JsonReader',
177                                                     xns: Roo.data,
178                                                     id : 'curr_id',
179                                                     root : 'data',
180                                                     totalProperty : 'total',
181                                                     fields : [{"name":"curr_id","type":"int"},"curr_symbol"]
182                                                 }
183                                             }
184                                         },
185                                         {
186                                             xtype: 'ComboBox',
187                                             xns: Roo.form,
188                                             allowBlank : false,
189                                             alwaysQuery : true,
190                                             displayField : 'terms_descrip',
191                                             editable : false,
192                                             emptyText : "Select Terms",
193                                             fieldLabel : 'Terms',
194                                             forceSelection : true,
195                                             hiddenName : 'vend_terms_id',
196                                             listWidth : 400,
197                                             loadingText : "Searching...",
198                                             minChars : 2,
199                                             name : 'vend_terms_id_terms_descrip',
200                                             pageSize : 20,
201                                             qtip : "Select Terms",
202                                             queryParam : 'query[terms_descrip]',
203                                             selectOnFocus : true,
204                                             tpl : '<div class="x-grid-cell-text x-btn button"><b>{terms_descrip}</b> </div>',
205                                             triggerAction : 'all',
206                                             typeAhead : true,
207                                             valueField : 'terms_id',
208                                             width : 200,
209                                             store : {
210                                                 xtype: 'Store',
211                                                 xns: Roo.data,
212                                                 listeners : {
213                                                     beforeload : function (_self, o){
214                                                         o.params = o.params || {};
215                                                     }
216                                                 },
217                                                 remoteSort : true,
218                                                 sortInfo : { direction : 'ASC', field: 'terms_descrip' },
219                                                 proxy : {
220                                                     xtype: 'HttpProxy',
221                                                     xns: Roo.data,
222                                                     method : 'GET',
223                                                     url : baseURL + '/Roo/terms.php'
224                                                 },
225                                                 reader : {
226                                                     xtype: 'JsonReader',
227                                                     xns: Roo.data,
228                                                     id : 'terms_id',
229                                                     root : 'data',
230                                                     totalProperty : 'total',
231                                                     fields : [{"name":"terms_id","type":"int"},"terms_descrip"]
232                                                 }
233                                             }
234                                         },
235                                         {
236                                             xtype: 'ComboBox',
237                                             xns: Roo.form,
238                                             allowBlank : false,
239                                             alwaysQuery : true,
240                                             displayField : 'taxzone_descrip',
241                                             editable : false,
242                                             emptyText : "Select Taxzone",
243                                             fieldLabel : 'Tax Zone',
244                                             forceSelection : true,
245                                             hiddenName : 'vend_taxzone_id',
246                                             listWidth : 400,
247                                             loadingText : "Searching...",
248                                             minChars : 2,
249                                             name : 'vend_taxzone_id_taxzone_descrip',
250                                             pageSize : 20,
251                                             qtip : "Select Taxzone",
252                                             queryParam : 'query[taxzone_descrip]',
253                                             selectOnFocus : true,
254                                             tpl : '<div class="x-grid-cell-text x-btn button"><b>{taxzone_descrip}</b> </div>',
255                                             triggerAction : 'all',
256                                             typeAhead : true,
257                                             valueField : 'taxzone_id',
258                                             width : 200,
259                                             store : {
260                                                 xtype: 'Store',
261                                                 xns: Roo.data,
262                                                 listeners : {
263                                                     beforeload : function (_self, o){
264                                                         o.params = o.params || {};
265                                                     }
266                                                 },
267                                                 remoteSort : true,
268                                                 sortInfo : { direction : 'ASC', field: 'taxzone_descrip' },
269                                                 proxy : {
270                                                     xtype: 'HttpProxy',
271                                                     xns: Roo.data,
272                                                     method : 'GET',
273                                                     url : baseURL + '/Roo/taxzone.php'
274                                                 },
275                                                 reader : {
276                                                     xtype: 'JsonReader',
277                                                     xns: Roo.data,
278                                                     id : 'taxzone_id',
279                                                     root : 'data',
280                                                     totalProperty : 'total',
281                                                     fields : [{"name":"taxzone_id","type":"int"},"taxzone_descrip"]
282                                                 }
283                                             }
284                                         },
285                                         {
286                                             xtype: 'ComboBox',
287                                             xns: Roo.form,
288                                             listeners : {
289                                                 add : function (combo)
290                                                 {
291                                                     Pman.Dialog.XtupleVendTypeEdit.show({vendtype_id : 0}, function(res){
292                                                         _this.form.findField('vend_vendtype_id').setFromData(res);
293                                                     
294                                                     });
295                                                 },
296                                                 edit : function (combo, record)
297                                                 {
298                                                     var s = _this.form.findField('vend_vendtype_id').getValue() * 1;
299                                                     if(s < 1){
300                                                         Roo.MessageBox.alert('Error','Please select a type');
301                                                         return;
302                                                     }
303                                                 
304                                                     Pman.Dialog.XtupleVendTypeEdit.show({vendtype_id : s}, function(res){
305                                                 
306                                                         _this.form.findField('vend_vendtype_id').setFromData(res);
307                                                     
308                                                     });
309                                                 }
310                                             },
311                                             allowBlank : false,
312                                             alwaysQuery : true,
313                                             displayField : 'vendtype_descrip',
314                                             editable : false,
315                                             emptyText : "Select Vendor Type",
316                                             fieldLabel : 'Type',
317                                             forceSelection : true,
318                                             hiddenName : 'vend_vendtype_id',
319                                             listWidth : 400,
320                                             loadingText : "Searching...",
321                                             minChars : 2,
322                                             name : 'vend_vendtype_id_vendtype_descrip',
323                                             pageSize : 20,
324                                             qtip : "Select Vendor Type",
325                                             queryParam : 'query[vendtype_descrip]',
326                                             selectOnFocus : true,
327                                             tpl : '<div class="x-grid-cell-text x-btn button"><b>{vendtype_descrip}</b> </div>',
328                                             triggerAction : 'all',
329                                             typeAhead : true,
330                                             valueField : 'vendtype_id',
331                                             width : 200,
332                                             store : {
333                                                 xtype: 'Store',
334                                                 xns: Roo.data,
335                                                 listeners : {
336                                                     beforeload : function (_self, o){
337                                                         o.params = o.params || {};
338                                                     }
339                                                 },
340                                                 remoteSort : true,
341                                                 sortInfo : { direction : 'ASC', field: 'vendtype_descrip' },
342                                                 proxy : {
343                                                     xtype: 'HttpProxy',
344                                                     xns: Roo.data,
345                                                     method : 'GET',
346                                                     url : baseURL + '/Roo/vendtype.php'
347                                                 },
348                                                 reader : {
349                                                     xtype: 'JsonReader',
350                                                     xns: Roo.data,
351                                                     id : 'vendtype_id',
352                                                     root : 'data',
353                                                     totalProperty : 'total',
354                                                     fields : [{"name":"vendtype_id","type":"int"},"vendtype_descrip"]
355                                                 }
356                                             }
357                                         },
358                                         {
359                                             xtype: 'Checkbox',
360                                             xns: Roo.form,
361                                             fieldLabel : 'Active',
362                                             inputValue : 'true',
363                                             name : 'vend_active',
364                                             valueOff : 0
365                                         },
366                                         {
367                                             xtype: 'TextArea',
368                                             xns: Roo.form,
369                                             allowBlank : true,
370                                             fieldLabel : 'Comments',
371                                             name : 'vend_comments'
372                                         }
373                                     ]
374                                 },
375                                 {
376                                     xtype: 'FieldSet',
377                                     xns: Roo.form,
378                                     hideLabels : true,
379                                     legend : "Address",
380                                     style : 'width:450px;',
381                                     items : [
382                                         {
383                                             xtype: 'ComboBox',
384                                             xns: Roo.form,
385                                             listeners : {
386                                                 add : function (combo)
387                                                 {
388                                                     Pman.Dialog.XtupleAddress.show({addr_id : 0});
389                                                 },
390                                                 edit : function (combo, record)
391                                                 {
392                                                     var s = _this.form.findField('vend_addr_id').getValue() * 1;
393                                                     if(s < 1){
394                                                         Roo.MessageBox.alert('Error','Please select a address');
395                                                         return;
396                                                     }
397                                                     Pman.Dialog.XtupleAddress.show({addr_id : s});
398                                                 },
399                                                 select : function (combo, record, index)
400                                                 {
401                                                     for(var i in record.data) {
402                                                         _this.data['vend_addr_id_' + i] = record.data[i];
403                                                     }
404                                                 
405                                                     _this.form.findField('addr_view').sync();
406                                                 }
407                                             },
408                                             allowBlank : false,
409                                             alwaysQuery : true,
410                                             displayField : 'addr_number',
411                                             editable : true,
412                                             emptyText : "Select Address",
413                                             fieldLabel : 'Address',
414                                             forceSelection : true,
415                                             hiddenName : 'vend_addr_id',
416                                             listWidth : 400,
417                                             loadingText : "Searching...",
418                                             minChars : 2,
419                                             name : 'vend_addr_id_addr_number',
420                                             pageSize : 20,
421                                             qtip : "Select Address",
422                                             queryParam : 'query[address]',
423                                             selectOnFocus : true,
424                                             tpl : '<div class="x-grid-cell-text x-btn button"><b>#{addr_id} - {addr_number}</b> </div>',
425                                             triggerAction : 'all',
426                                             typeAhead : true,
427                                             valueField : 'addr_id',
428                                             width : 400,
429                                             store : {
430                                                 xtype: 'Store',
431                                                 xns: Roo.data,
432                                                 listeners : {
433                                                     beforeload : function (_self, o){
434                                                         o.params = o.params || {};
435                                                         addr_active = 1;
436                                                     }
437                                                 },
438                                                 remoteSort : true,
439                                                 sortInfo : { direction : 'DESC', field: 'addr_id' },
440                                                 proxy : {
441                                                     xtype: 'HttpProxy',
442                                                     xns: Roo.data,
443                                                     method : 'GET',
444                                                     url : baseURL + '/Roo/addr.php'
445                                                 },
446                                                 reader : {
447                                                     xtype: 'JsonReader',
448                                                     xns: Roo.data,
449                                                     id : 'addr_id',
450                                                     root : 'data',
451                                                     totalProperty : 'total',
452                                                     fields : [{"name":"addr_id","type":"int"},"addr_number"]
453                                                 }
454                                             }
455                                         },
456                                         {
457                                             xtype: 'TextArea',
458                                             xns: Roo.form,
459                                             allowBlank : true,
460                                             fieldLabel : 'Notes',
461                                             name : 'addr_view',
462                                             readOnly : true,
463                                             width : 400,
464                                             sync : function() {
465                                                 var a = [ 'line1', 'line2', 'line3', 'city', 'state', 'country' ];
466                                                 var v = [];
467                                                 
468                                                 Roo.each(a, function(e) {
469                                                     if (_this.data['vend_addr_id_addr_' +e].length) {
470                                                         v.push(_this.data['vend_addr_id_addr_' +e]);
471                                                     }
472                                                 });
473                                                 
474                                                 this.setValue(v.join("\n"));
475                                             }
476                                         }
477                                     ]
478                                 },
479                                 {
480                                     xtype: 'Hidden',
481                                     xns: Roo.form,
482                                     name : 'vend_id'
483                                 }
484                             ]
485                         }
486                     ]
487                 },
488                 {
489                     xtype: 'GridPanel',
490                     xns: Roo,
491                     listeners : {
492                         activate : function() {
493                             _this.panel = this;
494                             if (_this.grid) {
495                                 _this.grid.footer.onClick('first');
496                             }
497                         }
498                     },
499                     background : true,
500                     fitContainer : true,
501                     fitToframe : true,
502                     region : 'center',
503                     tableName : 'itemsrc',
504                     title : "Supplier of",
505                     grid : {
506                         xtype: 'Grid',
507                         xns: Roo.grid,
508                         listeners : {
509                             render : function() 
510                             {
511                                 _this.grid = this; 
512                                 //_this.dialog = Pman.Dialog.FILL_IN
513                                 if (_this.panel.active) {
514                                    this.footer.onClick('first');
515                                 }
516                             },
517                             rowdblclick : function (_self, rowIndex, e)
518                             {
519                                 if (!_this.dialog) return;
520                                 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
521                                     _this.grid.footer.onClick('first');
522                                 }); 
523                             }
524                         },
525                         autoExpandColumn : 'itemsrc_vend_item_descrip',
526                         loadMask : true,
527                         dataSource : {
528                             xtype: 'Store',
529                             xns: Roo.data,
530                             listeners : {
531                                 beforeload : function (_self, options)
532                                 {
533                                     options.params.itemsrc_vend_id =   _this.form.findField('vend_id').getValue();
534                                 }
535                             },
536                             remoteSort : true,
537                             sortInfo : { field : 'itemsrc_id_item_number', direction: 'ASC' },
538                             proxy : {
539                                 xtype: 'HttpProxy',
540                                 xns: Roo.data,
541                                 method : 'GET',
542                                 url : baseURL + '/Roo/itemsrc.php'
543                             },
544                             reader : {
545                                 xtype: 'JsonReader',
546                                 xns: Roo.data,
547                                 totalProperty : 'total',
548                                 root : 'data',
549                                 id : 'id',
550                                 fields : [
551                                     {
552                                         'name': 'itemsrc_id',
553                                         'type': 'int'
554                                     },
555                                     {
556                                         'name': 'itemsrc_item_id',
557                                         'type': 'int'
558                                     },
559                                     {
560                                         'name': 'itemsrc_item_id',
561                                         'type': 'int'
562                                     },
563                                     {
564                                         'name': 'itemsrc_vend_id',
565                                         'type': 'int'
566                                     },
567                                     {
568                                         'name': 'itemsrc_vend_id',
569                                         'type': 'int'
570                                     },
571                                     {
572                                         'name': 'itemsrc_vend_item_number',
573                                         'type': 'string'
574                                     },
575                                     {
576                                         'name': 'itemsrc_vend_item_descrip',
577                                         'type': 'string'
578                                     },
579                                     {
580                                         'name': 'itemsrc_comments',
581                                         'type': 'string'
582                                     },
583                                     {
584                                         'name': 'itemsrc_vend_uom',
585                                         'type': 'string'
586                                     },
587                                     {
588                                         'name': 'itemsrc_invvendoruomratio',
589                                         'type': 'float'
590                                     },
591                                     {
592                                         'name': 'itemsrc_minordqty',
593                                         'type': 'float'
594                                     },
595                                     {
596                                         'name': 'itemsrc_multordqty',
597                                         'type': 'float'
598                                     },
599                                     {
600                                         'name': 'itemsrc_leadtime',
601                                         'type': 'int'
602                                     },
603                                     {
604                                         'name': 'itemsrc_ranking',
605                                         'type': 'int'
606                                     },
607                                     {
608                                         'name': 'itemsrc_active',
609                                         'type': 'int'
610                                     },
611                                     {
612                                         'name': 'itemsrc_manuf_name',
613                                         'type': 'string'
614                                     },
615                                     {
616                                         'name': 'itemsrc_manuf_item_number',
617                                         'type': 'string'
618                                     },
619                                     {
620                                         'name': 'itemsrc_manuf_item_descrip',
621                                         'type': 'string'
622                                     },
623                                     {
624                                         'name': 'itemsrc_default',
625                                         'type': 'int'
626                                     },
627                                     {
628                                         'name': 'itemsrc_upccode',
629                                         'type': 'string'
630                                     }
631                                 ]
632                             }
633                         },
634                         footer : {
635                             xtype: 'PagingToolbar',
636                             xns: Roo,
637                             pageSize : 25,
638                             displayInfo : true,
639                             displayMsg : "Displaying itemsrc{0} - {1} of {2}",
640                             emptyMsg : "No itemsrc found"
641                         },
642                         toolbar : {
643                             xtype: 'Toolbar',
644                             xns: Roo,
645                             items : [
646                                 {
647                                     xtype: 'Button',
648                                     xns: Roo.Toolbar,
649                                     text : "Add",
650                                     cls : 'x-btn-text-icon',
651                                     icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
652                                     listeners : {
653                                         click : function()
654                                         {
655                                             if (!_this.dialog) return;
656                                             _this.dialog.show( { id : 0 } , function() {
657                                                 _this.grid.footer.onClick('first');
658                                            }); 
659                                         }
660                                     }
661                                 },
662                                 {
663                                     xtype: 'Fill',
664                                     xns: Roo.Toolbar
665                                 },
666                                 {
667                                     xtype: 'Button',
668                                     xns: Roo.Toolbar,
669                                     text : "Delete",
670                                     cls : 'x-btn-text-icon',
671                                     icon : rootURL + '/Pman/templates/images/trash.gif',
672                                     listeners : {
673                                         click : function()
674                                         {
675                                              Pman.genericDelete(_this, 'itemsrc'); 
676                                         }
677                                     }
678                                 }
679                             ]
680                         },
681                         colModel : [
682                             {
683                                 xtype: 'ColumnModel',
684                                 xns: Roo.grid,
685                                 dataIndex : 'itemsrc_item_id_item_number',
686                                 header : 'Item',
687                                 width : 120,
688                                 renderer : function(v) { return String.format('{0}', v); }
689                             },
690                             {
691                                 xtype: 'ColumnModel',
692                                 xns: Roo.grid,
693                                 dataIndex : 'itemsrc_vend_item_number',
694                                 header : 'Vendor item number',
695                                 width : 120,
696                                 renderer : function(v) { return String.format('{0}', v); }
697                             },
698                             {
699                                 xtype: 'ColumnModel',
700                                 xns: Roo.grid,
701                                 dataIndex : 'itemsrc_vend_item_descrip',
702                                 header : 'Vendor item description',
703                                 width : 200,
704                                 renderer : function(v) { return String.format('{0}', v); }
705                             },
706                             {
707                                 xtype: 'ColumnModel',
708                                 xns: Roo.grid,
709                                 dataIndex : 'itemsrc_vend_uom',
710                                 header : 'Uom',
711                                 width : 50,
712                                 renderer : function(v) { return String.format('{0}', v); }
713                             },
714                             {
715                                 xtype: 'ColumnModel',
716                                 xns: Roo.grid,
717                                 dataIndex : 'itemsrc_minordqty',
718                                 header : 'Min ord qty',
719                                 width : 50,
720                                 renderer : function(v) { return String.format('{0}', v); }
721                             },
722                             {
723                                 xtype: 'ColumnModel',
724                                 xns: Roo.grid,
725                                 dataIndex : 'itemsrc_leadtime',
726                                 header : 'Lead time',
727                                 width : 75,
728                                 renderer : function(v) { return String.format('{0}', v); }
729                             },
730                             {
731                                 xtype: 'ColumnModel',
732                                 xns: Roo.grid,
733                                 dataIndex : 'itemsrc_active',
734                                 header : 'Active',
735                                 width : 75,
736                                 renderer : function(v) { return String.format('{0}', v); }
737                             }
738                         ]
739                     }
740                 }
741             ],
742             center : {
743                 xtype: 'LayoutRegion',
744                 xns: Roo,
745                 tabPosition : 'top'
746             },
747             buttons : [
748                 {
749                     xtype: 'Button',
750                     xns: Roo,
751                     listeners : {
752                         click : function (_self, e)
753                         {
754                             _this.dialog.hide();
755                         }
756                     },
757                     text : "Cancel"
758                 },
759                 {
760                     xtype: 'Button',
761                     xns: Roo,
762                     listeners : {
763                         click : function (_self, e)
764                         {
765                             _this.form.doAction("submit");
766                         
767                         }
768                     },
769                     text : "Save"
770                 }
771             ]
772         });
773     }
774 };