mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Set appropriate autocomplete
attributes on password fields (#13078)
`new-password` prevents annoying autocompletion in some cases, thought it's not semantically correct to use that for example on all three fields on the user account page, so some annoyances remain. Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
@@ -9,13 +9,13 @@
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
||||
<label for="retype">{{.i18n.Tr "re_type"}}</label>
|
||||
<input id="retype" name="retype" type="password" autocomplete="off" required>
|
||||
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
|
@@ -19,7 +19,7 @@
|
||||
{{if .IsResetForm}}
|
||||
<div class="required inline field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" autofocus required>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" autofocus required>
|
||||
</div>
|
||||
{{if not .user_signed_in}}
|
||||
<div class="inline field">
|
||||
|
@@ -18,7 +18,7 @@
|
||||
{{if or (not .DisablePassword) .LinkAccountMode}}
|
||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .LinkAccountMode}}
|
||||
|
@@ -29,11 +29,11 @@
|
||||
{{if not .DisablePassword}}
|
||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
|
||||
</div>
|
||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
||||
<label for="retype">{{.i18n.Tr "re_type"}}</label>
|
||||
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="off" required>
|
||||
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
|
||||
|
@@ -13,16 +13,16 @@
|
||||
{{if .SignedUser.IsPasswordSet}}
|
||||
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
||||
<label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
|
||||
<input id="old_password" name="old_password" type="password" autocomplete="off" autofocus required>
|
||||
<input id="old_password" name="old_password" type="password" autocomplete="current-password" autofocus required>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
||||
<input id="password" name="password" type="password" autocomplete="off" required>
|
||||
<input id="password" name="password" type="password" autocomplete="new-password" required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
|
||||
<input id="retype" name="retype" type="password" autocomplete="off" required>
|
||||
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
@@ -179,7 +179,7 @@
|
||||
<input class="fake" type="password">
|
||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password-confirmation">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password-confirmation" name="password" type="password" required>
|
||||
<input id="password-confirmation" name="password" type="password" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui red button delete-button" id="delete-account" data-type="form" data-form="#delete-form">
|
||||
|
Reference in New Issue
Block a user