|
|
@@ -164,6 +164,7 @@ const LoginForm = ({close}) => {
|
|
|
}
|
|
|
},[])
|
|
|
useEffect(() => {
|
|
|
+ objInfo.inSubmit=false;
|
|
|
if (hash===ROUTE_PATH.SIGN_IN){
|
|
|
setShowType(TYPE_LOGIN);
|
|
|
}
|
|
|
@@ -786,6 +787,32 @@ const LoginForm = ({close}) => {
|
|
|
innerRef={ref}/>)
|
|
|
}}
|
|
|
/>
|
|
|
+ <Controller control={control}
|
|
|
+ name="password"
|
|
|
+ rules={{required: true, minLength: 6}}
|
|
|
+ render={({field: {ref, onChange, value}, fieldState: {error}}) => (
|
|
|
+ <PasswordInput
|
|
|
+ className={classNames({'input-control--error': error})}
|
|
|
+ value={value}
|
|
|
+ message={error ? i18n.t("form_errors.pass") : ''}
|
|
|
+ onChange={e => onChange(e.target.value)}
|
|
|
+ placeholder={i18n.t('login.login_pwd')}
|
|
|
+ innerRef={ref}/>
|
|
|
+ )}
|
|
|
+ />
|
|
|
+ <Controller control={control}
|
|
|
+ name="repassword"
|
|
|
+ rules={{required: true, minLength: 6}}
|
|
|
+ render={({field: {ref, onChange, value}, fieldState: {error}}) => (
|
|
|
+ <PasswordInput
|
|
|
+ className={classNames({'input-control--error': error})}
|
|
|
+ value={value}
|
|
|
+ message={error ? i18n.t("form_errors.pass") : ''}
|
|
|
+ onChange={e => onChange(e.target.value)}
|
|
|
+ placeholder={i18n.t('login.re_pwd')}
|
|
|
+ innerRef={ref}/>
|
|
|
+ )}
|
|
|
+ />
|
|
|
<Controller control={control}
|
|
|
name="code"
|
|
|
rules={{required: true}}
|