FR.addDT={sets:[{xtype:"hidden"}]};Ext.each(FR.allSets,function(set){FR.addDT.sets.push({xtype:"checkbox",name:"sets[]",inputValue:set.id,boxLabel:set.name,checked:false})});FR.addDT.formPanel=new FR.components.editForm({title:"Add file type",layout:"form",autoScroll:true,items:[{xtype:"fieldset",width:500,defaults:{width:250},items:[{xtype:"textfield",fieldLabel:"File type name",name:"name",value:""},{xtype:"textarea",fieldLabel:"Description",name:"description",value:""},{xtype:"checkboxgroup",fieldLabel:"Filed sets",columns:1,cls:"x-form-field-like",items:FR.addDT.sets},{xtype:"textarea",fieldLabel:"File extensions",helpText:"Comma separated list of file extensions that should automatically use this file type.",name:"ext",height:60,value:""},{xtype:"textfield",fieldLabel:"File types",helpText:"Comma separated list of file types that should automatically use this file type.",name:"file_types",value:""}]}],tbar:[{text:"Add file type",cls:"fr-btn-primary",ref:"saveBtn",handler:function(){var editForm=this.ownerCt.ownerCt;var opts={url:FR.URLRoot+"/?module=metadata&section=cpanel&page=add_filetype&action=add",maskText:"Saving changes..."};editForm.submitForm(opts)}}]});Ext.getCmp("gridTabPanel").add(FR.addDT.formPanel);FR.addDT.formPanel.show();