FR.editSettings={};FR.editSettings.formPanel=new FR.components.editForm({title:"Third party services",layout:"form",autoScroll:true,defaults:{width:500},items:[{xtype:"fieldset",labelWidth:1,items:[{xtype:"checkbox",boxLabel:"Use Gravatar.com for users profile images.",width:400,value:1,name:"settings[gravatar_enabled]",checked:parseInt(FR.settings.gravatar_enabled)}]},{xtype:"fieldset",title:"URL Shortener",labelWidth:150,items:[{xtype:"textfield",fieldLabel:"Bitly Access Token",width:280,name:"settings[bitly_access_token]",value:FR.settings.bitly_access_token},{xtype:"displayfield",hideLabel:true,style:"color: var(--theme-textLighter)",value:FR.T("Get it from %1").replace("%1",'<a href="https://bitly.com/a/oauth_apps" target="_blank">Bitly.com</a>')}]},{xtype:"fieldset",labelWidth:150,title:"Google Static Maps API",items:[{xtype:"textfield",fieldLabel:"API key",width:280,name:"settings[google_static_maps_api_key]",value:FR.settings.google_static_maps_api_key},{xtype:"displayfield",hideLabel:true,style:"color: var(--theme-textLighter)",value:FR.T("Get it from %1").replace("%1",'<a href="https://developers.google.com/maps/documentation/static-maps/" target="_blank">Google Maps APIs - Static Maps API</a>')}]},{xtype:"fieldset",disabled:FR.system.isFree,disabledMaskText:FR.T("Available in the %1 version").replace("%1",'<a href="https://filerun.com/get-enterprise" target="_blank">Enterprise FileRun</a>'),checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox",id:"settings[pushercom_enable]"},checkboxName:"settings[pushercom_enable]",title:"Enable Pusher.com Integration",animCollapse:true,collapsed:!FR.system.isFree&&!parseInt(FR.settings.pushercom_enable),labelWidth:150,defaults:{width:280},items:[{xtype:"textfield",fieldLabel:"App ID",width:100,name:"settings[pushercom_app_id]",value:FR.settings.pushercom_app_id},{xtype:"textfield",fieldLabel:"App Key",name:"settings[pushercom_app_key]",value:FR.settings.pushercom_app_key},{xtype:"textfield",fieldLabel:"App Secret",name:"settings[pushercom_app_secret]",value:FR.settings.pushercom_app_secret,inputType:"password",listeners:{focus:function(){this.getEl().dom.setAttribute("type","text")},blur:function(){this.getEl().dom.setAttribute("type","password")}}},{xtype:"textfield",fieldLabel:"Cluster",name:"settings[pushercom_cluster]",value:FR.settings.pushercom_cluster},{xtype:"displayfield",hideLabel:true,style:"color: var(--theme-textLighter)",value:FR.T("Get them from %1").replace("%1",'<a href="https://pusher.com" target="_blank"">https://pusher.com</a>')},{xtype:"checkbox",value:1,boxLabel:"Show online users",helpText:FR.T('After enabling this option, a section entitled "Users online" will show in the menu next time the control panel is loaded.'),name:"settings[pushercom_show_online]",checked:parseInt(FR.settings.pushercom_show_online)}]},{xtype:"fieldset",title:"Tracker codes",defaults:{hideLabel:true},items:[{xtype:"displayfield",style:"color: var(--theme-textLighter)",value:"Paste here your traffic analysis tracking HTML code"},{xtype:"textarea",width:450,height:150,name:"settings[tracker_codes]",value:FR.settings.tracker_codes}]}],tbar:[{text:"Save changes",cls:"fr-btn-primary",ref:"saveBtn",handler:function(){var editForm=this.ownerCt.ownerCt;var params=editForm.form.getFieldValues();var extra={};if(!FR.system.isFree){extra["settings[pushercom_enable]"]=Ext.get("settings[pushercom_enable]").dom.checked?1:0}Ext.apply(params,extra);var opts={url:FR.URLRoot+"/?module=cpanel&section=settings&action=save",maskText:"Saving changes...",params:params};editForm.submitForm(opts)}}]});Ext.getCmp("appTab").add(FR.editSettings.formPanel);Ext.getCmp("appTab").doLayout();