FR.editSettings={};FR.editSettings.formPanel=new FR.components.editForm({title:"Sign up",autoScroll:true,layout:"form",defaults:{width:600},labelWidth:160,disabled:FR.system.isFree||FR.system.isFreelancer,disabledMaskText:FR.T("Available in the %1 version").replace("%1",'<a href="https://filerun.com/get-enterprise" target="_blank">Enterprise FileRun</a>'),items:[{xtype:"fieldset",animCollapse:true,checkboxToggle:{tag:"input",type:"checkbox",id:"settings[user_registration_enable]"},checkboxName:"settings[user_registration_enable]",title:"Enable sign up",collapsed:!parseInt(FR.settings.user_registration_enable),defaults:{width:400},items:[{xtype:"combo",fieldLabel:"Role",width:200,name:"settings[user_registration_default_role]",hiddenName:"settings[user_registration_default_role]",autoCreate:true,mode:"local",editable:false,emptyText:"Select...",displayField:"name",valueField:"id",triggerAction:"all",disableKeyFilter:true,value:FR.settings.user_registration_default_role?FR.settings.user_registration_default_role:"-",store:new Ext.data.SimpleStore({fields:["id","name"],data:FR.roles})},{xtype:"checkbox",boxLabel:"E-mail account confirmation links.",value:1,name:"settings[user_registration_email_verification]",checked:parseInt(FR.settings.user_registration_email_verification)},{xtype:"checkbox",boxLabel:"New accounts require admin activation.",value:1,name:"settings[user_registration_approval]",checked:parseInt(FR.settings.user_registration_approval)},{xtype:"checkbox",boxLabel:"Automatically generate the passwords.",value:1,name:"settings[user_registration_generate_passwords]",checked:parseInt(FR.settings.user_registration_generate_passwords)},{xtype:"userslistfield",name:"settings[user_registration_default_groups]",only:"groups",value:FR.settings.user_registration_default_groups,fieldLabel:"Default groups",tcfg:{height:160,width:300}},{xtype:"checkboxgroup",fieldLabel:"Required fields",defaults:{value:1},columns:1,width:300,items:[{boxLabel:"E-mail address",name:"settings[user_registration_reqfields_email]",checked:parseInt(FR.settings.user_registration_reqfields_email)},{boxLabel:"Phone",name:"settings[user_registration_reqfields_phone]",checked:parseInt(FR.settings.user_registration_reqfields_phone)},{boxLabel:"Company",name:"settings[user_registration_reqfields_company]",checked:parseInt(FR.settings.user_registration_reqfields_company)},{boxLabel:"Web site address",name:"settings[user_registration_reqfields_website]",checked:parseInt(FR.settings.user_registration_reqfields_website)},{boxLabel:"Comment",name:"settings[user_registration_reqfields_description]",checked:parseInt(FR.settings.user_registration_reqfields_description)}]}]}],tbar:[{text:"Save changes",cls:"fr-btn-primary",ref:"saveBtn",handler:function(){var editForm=this.formPanel;var params=editForm.form.getFieldValues();var extra={};extra["settings[user_registration_enable]"]=Ext.get("settings[user_registration_enable]").dom.checked?1:0;Ext.apply(params,extra);var opts={url:FR.URLRoot+"/?module=cpanel&section=settings&page=authentication&action=save",maskText:"Saving changes...",params:params};editForm.submitForm(opts)},scope:FR.editSettings}]});Ext.getCmp("appTab").add(FR.editSettings.formPanel);Ext.getCmp("appTab").doLayout(false,true);