MODx.grid.Provider=function(A){A=A||{};Ext.applyIf(A,{title:_("providers"),url:MODx.config.connectors_url+"workspace/providers.php",fields:["id","name","description","service_url","api_key","menu"],paging:true,autosave:true,columns:[{header:_("name"),dataIndex:"name",editor:{xtype:"textfield",allowBlank:false}},{header:_("service_url"),dataIndex:"service_url",width:200,editor:{xtype:"textfield",allowBlank:false}},{header:_("description"),dataIndex:"description",width:300,editor:{xtype:"textarea"}}],tbar:[{text:_("provider_add"),handler:{xtype:"modx-window-provider-create",blankValues:true}}]});MODx.grid.Provider.superclass.constructor.call(this,A);};Ext.extend(MODx.grid.Provider,MODx.grid.Grid);Ext.reg("modx-grid-provider",MODx.grid.Provider);MODx.window.CreateProvider=function(A){A=A||{};Ext.applyIf(A,{title:_("provider_add"),id:"modx-window-provider-create",width:400,url:MODx.config.connectors_url+"workspace/providers.php",action:"create",fields:[{fieldLabel:_("name"),name:"name",id:"modx-cprov-name",xtype:"textfield",anchor:"95%",allowBlank:false},{fieldLabel:_("service_url"),name:"service_url",id:"modx-cprov-service-url",xtype:"textfield",anchor:"95%",allowBlank:false},{fieldLabel:_("api_key"),name:"api_key",id:"modx-cprov-api_key",xtype:"textfield",anchor:"95%"},{fieldLabel:_("description"),name:"description",id:"modx-cprov-description",xtype:"textarea",anchor:"95%",grow:true}]});MODx.window.CreateProvider.superclass.constructor.call(this,A);};Ext.extend(MODx.window.CreateProvider,MODx.Window);Ext.reg("modx-window-provider-create",MODx.window.CreateProvider);MODx.window.UpdateProvider=function(A){A=A||{};Ext.applyIf(A,{title:_("provider_update"),id:"modx-window-provider-update",width:400,url:MODx.config.connectors_url+"workspace/providers.php",action:"update",fields:[{name:"id",xtype:"hidden"},{fieldLabel:_("name"),name:"name",id:"modx-uprov-name",xtype:"textfield",anchor:"95%",allowBlank:false},{fieldLabel:_("service_url"),name:"service_url",id:"modx-uprov-service-url",xtype:"textfield",anchor:"95%",allowBlank:false},{fieldLabel:_("api_key"),name:"api_key",id:"modx-uprov-api_key",xtype:"textfield",anchor:"95%"},{fieldLabel:_("description"),name:"description",id:"modx-uprov-description",xtype:"textarea",anchor:"95%",grow:true}]});MODx.window.UpdateProvider.superclass.constructor.call(this,A);};Ext.extend(MODx.window.UpdateProvider,MODx.Window);Ext.reg("modx-window-provider-update",MODx.window.UpdateProvider);