var FR={UI:{translations:[]}};Ext.onReady(function(){if(Settings.ui_bg){Ext.getBody().addClass("fr-transparent-login")}FR.win=new Ext.Window({title:"User Registration",cls:"login",closable:false,draggable:false,maximized:Ext.isSmallScreen,width:400,autoScroll:true,bodyStyle:"padding:var(--pad) 0",items:[FR.registrationForm=new Ext.form.FormPanel({hideLabels:true,defaultType:"textfield",autoHeight:true,defaults:{width:"100%"},items:[{emptyText:"Username",name:"username"},{emptyText:"E-mail address",name:"email"},{xtype:"compositefield",hidden:generatePass,items:[{flex:1,emptyText:"Password",name:"password",cls:"loginFormField",inputType:generatePass?"hidden":"password",xtype:generatePass?"hidden":"textfield"},{flex:1,emptyText:"Retype password",name:"repassword",cls:"loginFormField",inputType:generatePass?"hidden":"password",xtype:generatePass?"hidden":"textfield"}]},{xtype:"compositefield",items:[{flex:1,xtype:"textfield",name:"first_name",emptyText:"First name"},{flex:1,xtype:"textfield",name:"last_name",emptyText:"Last name"}]},{emptyText:"Phone",name:"phone"},{emptyText:"Company",name:"company"},{emptyText:"Web site address",name:"website"},{emptyText:"Comment",name:"description",xtype:"textarea"},{hidden:!Settings.enableCaptcha,hideLabel:true,xtype:"field",height:80,autoCreate:{tag:"div",id:"recaptcha",cls:"g-recaptcha",style:"margin-left:13px"}}]})],buttons:[{text:"Sign in",cls:"fr-btn-link",handler:function(){document.location.href=URLRoot}},"->",{text:"Submit",cls:"fr-btn-primary",handler:function(){var button=this;button.disable();FR.win.el.mask(FR.T("Loading..."));FR.registrationForm.getForm().submit({url:signUpURL,failure:function(frm,act){if(Settings.enableCaptcha){grecaptcha.reset()}button.enable();FR.win.el.unmask();var msg=act.result?act.result.error:FR.T("A problem was encountered while trying to submit the form: ")+act.response.statusText;new Ext.ux.prompt({text:msg})},success:function(frm,act){button.enable();FR.win.el.unmask();new Ext.ux.prompt({text:act.result.message,callback:function(){document.location.href=URLRoot}})}})}}]});FR.win.show();if(!Ext.isSmallScreen){FR.win.anchorTo(Ext.get("theBODY"),"c-c")}});var onloadGRCCallback=function(){grecaptcha.render("recaptcha",{sitekey:Settings.recaptcha_site_key})};