Skip to content

Commit 0db515d

Browse files
author
Otto
committed
Merge pull request '[v9.0/forgejo] fix: Move forgot_password-link to fix login tab order' (go-gitea#5887) from fnetx/bp-5838 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5887 Reviewed-by: Gusted <[email protected]>
2 parents 336ccf4 + 6025b93 commit 0db515d

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

templates/user/auth/signin_inner.tmpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
1818
</div>
1919
{{if or (not .DisablePassword) .LinkAccountMode}}
20-
<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}} form-field-content-aside-label">
20+
<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
2121
<label for="password">{{ctx.Locale.Tr "password"}}</label>
22-
<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
2322
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
2423
</div>
2524
{{end}}
@@ -52,11 +51,15 @@
5251
<div class="ui container fluid">
5352
{{template "user/auth/webauthn_error" .}}
5453

55-
{{if .ShowRegistrationButton}}
5654
<div class="ui attached segment header top tw-max-w-2xl tw-m-auto tw-flex tw-flex-col tw-items-center">
55+
{{if .ShowRegistrationButton}}
5756
<div class="field">
5857
{{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}}
58+
<br>
59+
</div>
60+
{{end}}
61+
<div class="field">
62+
<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
5963
</div>
6064
</div>
61-
{{end}}
6265
</div>

web_src/css/form.css

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -500,20 +500,6 @@ textarea:focus,
500500
}
501501
}
502502

503-
/* form fields with additional content besides their label, used on login form
504-
* use like <div class="field"><label/><a/><input/></div> */
505-
.form-field-content-aside-label {
506-
display: grid;
507-
grid-template-columns: 1fr 1fr;
508-
}
509-
.form-field-content-aside-label > *:nth-child(2) {
510-
text-align: right;
511-
margin-bottom: 4px;
512-
}
513-
.form-field-content-aside-label input {
514-
grid-column: span 2;
515-
}
516-
517503
.ui.form .field > .selection.dropdown {
518504
min-width: 14em; /* matches the default min width */
519505
}

0 commit comments

Comments
 (0)