Ext.ns("feyaSoft.main");feyaSoft.main.LoginPanel=function(){var signInPanel=new Ext.Panel({bodyStyle:"padding: 15px 15px 10px 15px",baseCls:"x-plain",html:'<img src="images/icons/lock.png" alt="login"/>&nbsp;&nbsp;Sign in to FeyaSoft MyActivity with <b>Account</b>',border:false,region:"north",height:50});this.username=new Ext.form.TextField({name:"j_username",allowBlank:false,fieldLabel:"Username",vtype:"alphanum",minLength:2,blankText:"Only alpha and numeric value allowed with 2 min length",anchor:"85%"});this.password=new Ext.form.TextField({fieldLabel:"Password",allowBlank:false,inputType:"password",name:"j_password",minLength:2,anchor:"85%"});var loginForm=new Ext.form.FormPanel({id:"login-form",baseCls:"x-plain",standardSubmit:true,width:350,height:110,frame:false,labelWidth:70,items:[this.username,this.password],buttonAlign:"center",keys:{key:[13],fn:function(){loginForm.getForm().getEl().dom.action="j_spring_security_check";loginForm.getForm().getEl().dom.method="POST";loginForm.getForm().submit()},scope:this},buttons:[{handler:function(){this.username.setValue("demo");this.password.setValue("demo");loginForm.getForm().getEl().dom.action="j_spring_security_check";loginForm.getForm().getEl().dom.method="POST";loginForm.getForm().submit()},scope:this,text:"Guest"},{text:"Register",scope:this,handler:function(){new feyaSoft.main.selfRegister.RegisterWizard({path:""})}},{handler:function(){loginForm.getForm().getEl().dom.action="j_spring_security_check";loginForm.getForm().getEl().dom.method="POST";loginForm.getForm().submit()},scope:this,text:"Login"}]});feyaSoft.main.LoginPanel.superclass.constructor.call(this,{region:"east",autoScroll:true,width:350,bodyStyle:"padding: 7px 7px 7px 7px",layout:"fit",border:false,items:[{layout:"border",items:[signInPanel,{region:"center",border:false,items:[loginForm]}]}]});this.on("afterlayout",function(){var urlAppend=window.location.search;if(urlAppend&&urlAppend.indexOf("?login_error=")>=0){Ext.Msg.show({title:"Login Error",msg:"The username or password you entered is incorrect",buttons:Ext.Msg.OK,minWidth:350,icon:Ext.MessageBox.ERROR})}},this,{single:true,delay:250})};Ext.extend(feyaSoft.main.LoginPanel,Ext.Panel,{});