diff options
author | Dessalines <tyhou13@gmx.com> | 2019-11-01 23:41:57 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-11-01 23:41:57 -0700 |
commit | 68e4b61808ee76730cdc9f4302700a60a2ebb3b5 (patch) | |
tree | 8d36fb7b39b963696dc980f89f836b52c4aea20a /ui/src/components/login.tsx | |
parent | 9f35b33dc7238f0d6748beafa79ca0af192b5ca6 (diff) |
Password reset mostly working.
Diffstat (limited to 'ui/src/components/login.tsx')
-rw-r--r-- | ui/src/components/login.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index c2db7ee6..8d0df3e3 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -9,7 +9,7 @@ import { PasswordResetForm, } from '../interfaces'; import { WebSocketService, UserService } from '../services'; -import { msgOp } from '../utils'; +import { msgOp, validEmail } from '../utils'; import { i18n } from '../i18next'; import { T } from 'inferno-i18next'; @@ -113,12 +113,13 @@ export class Login extends Component<any, State> { class="form-control" required /> - <div + <button + disabled={!validEmail(this.state.loginForm.username_or_email)} onClick={linkEvent(this, this.handlePasswordReset)} - class="pointer d-inline-block float-right text-muted small font-weight-bold" + className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold" > <T i18nKey="forgot_password">#</T> - </div> + </button> </div> </div> <div class="form-group row"> @@ -287,6 +288,7 @@ export class Login extends Component<any, State> { } handlePasswordReset(i: Login) { + event.preventDefault(); let resetForm: PasswordResetForm = { email: i.state.loginForm.username_or_email, }; |