Skip to content

Commit e8241bf

Browse files
blueworrybeartechknowlogick
authored andcommitted
update #9066 Always show Password field on link account sign in page (#9147)
1 parent d0edb60 commit e8241bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/user/auth.go

+1
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ func LinkAccountPostSignIn(ctx *context.Context, signInForm auth.SignInForm) {
788788
u, err := models.UserSignIn(signInForm.UserName, signInForm.Password)
789789
if err != nil {
790790
if models.IsErrUserNotExist(err) {
791+
ctx.Data["user_exists"] = true
791792
ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplLinkAccount, &signInForm)
792793
} else {
793794
ctx.ServerError("UserLinkAccount", err)

templates/user/auth/signin_inner.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
1616
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
1717
</div>
18-
{{if not .DisablePassword}}
18+
{{if or (not .DisablePassword) .LinkAccountMode}}
1919
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
2020
<label for="password">{{.i18n.Tr "password"}}</label>
2121
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>

0 commit comments

Comments
 (0)