1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-28 09:21:13 -05:00

Merge pull request 'fix: Move "forgot_password"-link to fix login tab order' (#5838) from mrsmoer/fix-login-taborder into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5838
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Gusted 2024-11-09 22:59:50 +00:00
commit ea1ff23f36
2 changed files with 7 additions and 18 deletions

View file

@ -17,9 +17,8 @@
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
</div>
{{if or (not .DisablePassword) .LinkAccountMode}}
<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}} form-field-content-aside-label">
<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
<label for="password">{{ctx.Locale.Tr "password"}}</label>
<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
</div>
{{end}}
@ -52,11 +51,15 @@
<div class="ui container fluid">
{{template "user/auth/webauthn_error" .}}
{{if .ShowRegistrationButton}}
<div class="ui attached segment header top tw-max-w-2xl tw-m-auto tw-flex tw-flex-col tw-items-center">
{{if .ShowRegistrationButton}}
<div class="field">
{{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}}
</div>
<br>
</div>
{{end}}
<div class="field">
<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
</div>
</div>
</div>

View file

@ -500,20 +500,6 @@ textarea:focus,
}
}
/* form fields with additional content besides their label, used on login form
* use like <div class="field"><label/><a/><input/></div> */
.form-field-content-aside-label {
display: grid;
grid-template-columns: 1fr 1fr;
}
.form-field-content-aside-label > *:nth-child(2) {
text-align: right;
margin-bottom: 4px;
}
.form-field-content-aside-label input {
grid-column: span 2;
}
.ui.form .field > .selection.dropdown {
min-width: 14em; /* matches the default min width */
}