From: Dessalines <tyhou13@gmx.com> Date: Thu, 11 Feb 2021 18:52:26 +0000 (-0500) Subject: Always show password reset link. Fixes #176 X-Git-Url: http://these/git/%22%7Burl%7D/%22?a=commitdiff_plain;h=5c664245167a9359ad9692109fadd3872d7652d7;p=lemmy-ui.git Always show password reset link. Fixes #176 --- diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 115ad2b..349d81c 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -11,6 +11,10 @@ cursor: pointer; } +.pointer-events { + pointer-events: auto !important; +} + .no-click { pointer-events:none; opacity: 0.65; diff --git a/src/shared/components/login.tsx b/src/shared/components/login.tsx index 7006ae7..f772f04 100644 --- a/src/shared/components/login.tsx +++ b/src/shared/components/login.tsx @@ -134,15 +134,15 @@ export class Login extends Component<any, State> { class="form-control" required /> - {validEmail(this.state.loginForm.username_or_email) && ( - <button - type="button" - onClick={linkEvent(this, this.handlePasswordReset)} - className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold" - > - {i18n.t('forgot_password')} - </button> - )} + <button + type="button" + onClick={linkEvent(this, this.handlePasswordReset)} + className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold pointer-events" + disabled={!validEmail(this.state.loginForm.username_or_email)} + title={i18n.t('no_password_reset')} + > + {i18n.t('forgot_password')} + </button> </div> </div> <div class="form-group row">