- <div className="mb-3 row">
- <label className="col-sm-2 col-form-label" htmlFor="login-password">
- {I18NextService.i18n.t("password")}
- </label>
- <div className="col-sm-10">
- <input
- type="password"
- id="login-password"
- value={this.state.form.password}
- onInput={linkEvent(this, this.handleLoginPasswordChange)}
- className="form-control"
- autoComplete="current-password"
- required
- maxLength={60}
- />
- <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 not-allowed"
- disabled={
- !!this.state.form.username_or_email &&
- !validEmail(this.state.form.username_or_email)
- }
- title={I18NextService.i18n.t("no_password_reset")}
- >
- {I18NextService.i18n.t("forgot_password")}
- </button>
- </div>
+ <div className="mb-3">
+ <PasswordInput
+ id="login-password"
+ value={this.state.form.password}
+ onInput={linkEvent(this, this.handleLoginPasswordChange)}
+ label={I18NextService.i18n.t("password")}
+ showForgotLink
+ />