Ext.define('treps.view.Times.TimesPanel' ,{ extend: 'Ext.form.Panel', alias: 'widget.times_panel', initComponent: function() { this.callParent(arguments); }, title: 'Time Field', addcheckbox: false, tools: [ { type: 'help', pageId: 'time' } ], layout: { type: 'vbox', padding: 5, margin: 5, align: 'stretch' }, items: [ { xtype: 'combo', name: 'timeformat', fieldLabel: 'Time format', queryMode: 'local', editable: false, valueField: 'id', tpl: Ext.create('Ext.XTemplate', '', '', '
{fullname} - {pattern}
', '', '
{fullname}
', '
', '
' ), displayTpl: Ext.create('Ext.XTemplate', '', '', '{fullname} - {pattern}', '', '{fullname}', '', '' ) }, { xtype: 'textfield', name: 'timepattern', fieldLabel: 'Time pattern' } ], listeners : { afterrender : function() { if (this.addcheckbox) { //insert chack box in header var check = Ext.create('Ext.form.field.Checkbox',{}); this.header.insert(0,check); } } } });