FR.editClient={};FR.editClient.formPanel=new FR.components.editForm({title:"Edit API client",layout:"form",defaults:{labelWidth:150,width:500,defaults:{width:300}},autoScroll:true,items:[{xtype:"hidden",name:"id",value:FR.clientInfo.id},{xtype:"fieldset",title:"Basic details",items:[{xtype:"checkbox",fieldLabel:"Enabled",name:"enabled",value:1,checked:parseInt(FR.clientInfo.enabled)},{xtype:"textfield",fieldLabel:"Client/App name",name:"name",value:FR.clientInfo.name},{xtype:"textfield",fieldLabel:"Logo URL",name:"logo_url",value:FR.clientInfo.logo_url},{xtype:"textfield",fieldLabel:"App website",name:"website",value:FR.clientInfo.website},{xtype:"textfield",fieldLabel:"Publisher",name:"publisher",value:FR.clientInfo.publisher},{xtype:"textfield",fieldLabel:"Website",name:"publisher_website",value:FR.clientInfo.publisher_website},{xtype:"textarea",fieldLabel:"Description",name:"description",value:FR.clientInfo.description}]},{xtype:"fieldset",title:"Security",items:[{xtype:"textfield",fieldLabel:"Client id",name:"cid",value:FR.clientInfo.cid,readOnly:true},{xtype:"textfield",fieldLabel:"Client secret",name:"secret",value:FR.clientInfo.secret,readOnly:true},{xtype:"textarea",fieldLabel:"Authorized redirect URIs",name:"redirect_uris",value:FR.clientInfo.URIs},{xtype:"displayfield",style:"color:var(--theme-textLighter)",value:"<li>"+FR.T("One URI per line")+"</li>"+"<li>"+FR.T('Needs to start with "https://".')+"</li>"+"<li>"+FR.T('"http://" only allowed for "localhost".')+"</li>"+"<li>"+FR.T("No URL fragments, and no relative paths.")+"</li>"+"<li>"+FR.T("Can't be a non-private IP Address.")+"</li>"}]}],tbar:[{text:"Save changes",cls:"fr-btn-primary",ref:"saveBtn",handler:function(){var editForm=this.ownerCt.ownerCt;var opts={url:FR.URLRoot+"/?module=oauth&section=cpanel&page=client_edit&action=save",maskText:"Saving changes...",params:editForm.form.getFieldValues()};editForm.submitForm(opts)}},"->",{text:"Delete client",iconCls:"fa-remove colorDanger",style:"margin-right:10px",handler:function(){FR.editClient.deleteHandler()}}]});FR.editClient.deleteHandler=function(){new Ext.ux.prompt({text:FR.T("Please confirm client deletion."),confirmHandler:function(){var opts={url:FR.URLRoot+"/?module=oauth&section=cpanel&page=client_delete&id="+FR.clientInfo.id,maskText:"Please wait..."};FR.editClient.formPanel.deleteAction(opts)}})};Ext.getCmp("gridTabPanel").add(FR.editClient.formPanel);FR.editClient.formPanel.show();