1import{ar as l,l as r,R as t,A as e,S as i}from"./index.5036f488.1791295314721.js";import{r as d}from"./agentation.8cf2c154.1791295314721.js";import{S as m}from"./scrollAnimation.min.fbece207.1791295314721.js";import{m as c}from"./selector.4b536653.1791295314721.js";import{w as g}from"./withTranslation.338d7523.1791295314721.js";import{T as h}from"./Translation.80f52c64.1791295314721.js";const a={vm:null,init(n){this.vm=n,this.vm.state={fields:{login:"",password:""},isFormValid:!1,isLoading:!1}},checkIsLogin(){const{user:n,history:s}=a.vm.props;n.isLogin&&s.push("/agent/settings")},handleFieldChange(n,s){let o=a.vm.state.fields;o[s]=n.target.value,a.vm.setState({fields:o},()=>{a.handleValidation()})},handleValidation(){let n=a.vm.state.fields,s=!0;(n.login===""||n.password==="")&&(s=!1),a.vm.setState({isFormValid:s})},handleKeyPress(n){n.key==="Enter"&&(n.preventDefault(),l.memberLogin(a.vm))}};class p extends t.Component{constructor(){super(),a.init(this)}componentDidMount(){a.checkIsLogin()}render(){return e.jsx(h,{children:s=>e.jsx(m,{animateIn:"fadeIn",duration:2,children:e.jsx("div",{className:"agentLoginForm",children:e.jsxs("div",{className:"agentLoginContainer",children:[e.jsx("div",{className:"userIcon",children:e.jsx("div",{className:"loginUserIcon",children:e.jsx(i,{category:"SVGAgentPortal",name:"userIcon"})})}),e.jsxs("div",{className:"formContainer",children:[e.jsx("label",{className:"standard-label",children:s("global:global.form.username","Username")}),e.jsx("input",{className:"standard-input",type:"text",value:this.state.login,placeholder:this.props.portal.settings&&this.props.portal.settings.features&&this.props.portal.settings.features.allowPhoneLogin?s("global:global.form.usernamePhone-placeholder","Username / Phone no."):s("global:global.form.username-placeholder","Username"),onChange:o=>a.handleFieldChange(o,"login"),onKeyPress:o=>a.handleKeyPress(o)})]}),e.jsxs("div",{className:"formContainer",children:[e.jsx("label",{className:"standard-label",children:s("global:global.form.newpassword-placeholder","Password")}),e.jsx("input",{className:"standard-input",type:"password",value:this.state.password,placeholder:s("global:global.form.newpassword-placeholder","Password"),onChange:o=>a.handleFieldChange(o,"password"),onKeyPress:o=>a.handleKeyPress(o)})]}),e.jsx("button",{className:"agentLoginBtn standard-submit-button",onClick:()=>{l.memberLogin(this)},children:s("global:global.menu.account.login","Login")})]})})})})}}const w=r.connect(c)(g(["global"])(d.withRouter(p)));export{w as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.