mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01: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:
parent
ea69ec6f0f
commit
1c523e2129
11 changed files with 17 additions and 17 deletions
|
@ -27,7 +27,7 @@
|
||||||
<input class="fake" type="password">
|
<input class="fake" type="password">
|
||||||
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
|
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
|
||||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||||
<input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}">
|
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
||||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
|
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<input class="fake" type="password">
|
<input class="fake" type="password">
|
||||||
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}hide{{end}}">
|
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}hide{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password">
|
<input id="password" name="password" type="password" autocomplete="new-password">
|
||||||
<p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
|
<p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="field {{if .Err_Website}}error{{end}}">
|
<div class="field {{if .Err_Website}}error{{end}}">
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<input class="fake" type="password">
|
<input class="fake" type="password">
|
||||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
|
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
|
||||||
|
|
|
@ -284,11 +284,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||||
<label for="admin_passwd">{{.i18n.Tr "install.admin_password"}}</label>
|
<label for="admin_passwd">{{.i18n.Tr "install.admin_password"}}</label>
|
||||||
<input id="admin_passwd" name="admin_passwd" type="password" value="{{.admin_passwd}}">
|
<input id="admin_passwd" name="admin_passwd" type="password" autocomplete="new-password" value="{{.admin_passwd}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||||
<label for="admin_confirm_passwd">{{.i18n.Tr "install.confirm_password"}}</label>
|
<label for="admin_confirm_passwd">{{.i18n.Tr "install.confirm_password"}}</label>
|
||||||
<input id="admin_confirm_passwd" name="admin_confirm_passwd" type="password" value="{{.admin_confirm_passwd}}">
|
<input id="admin_confirm_passwd" name="admin_confirm_passwd" autocomplete="new-password" type="password" value="{{.admin_confirm_passwd}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_AdminEmail}}error{{end}}">
|
<div class="inline field {{if .Err_AdminEmail}}error{{end}}">
|
||||||
<label for="admin_email">{{.i18n.Tr "install.admin_email"}}</label>
|
<label for="admin_email">{{.i18n.Tr "install.admin_email"}}</label>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<input class="fake" type="password">
|
<input class="fake" type="password">
|
||||||
<div class="inline required field {{if .Err_Password}}error{{end}}">
|
<div class="inline required field {{if .Err_Password}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" autofocus required>
|
<input id="password" name="password" type="password" autocomplete="off" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
|
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
|
||||||
{{.i18n.Tr "org.settings.confirm_delete_account"}}
|
{{.i18n.Tr "org.settings.confirm_delete_account"}}
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
<input class="fake" type="password">
|
<input class="fake" type="password">
|
||||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||||
<label for="mirror_password">{{.i18n.Tr "password"}}</label>
|
<label for="mirror_password">{{.i18n.Tr "password"}}</label>
|
||||||
<input id="mirror_password" name="mirror_password" type="password" value="{{MirrorPassword .Mirror}}" {{if not .mirror_password}}data-need-clear="true"{{end}}>
|
<input id="mirror_password" name="mirror_password" type="password" value="{{MirrorPassword .Mirror}}" {{if not .mirror_password}}data-need-clear="true"{{end}} autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
<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>
|
<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>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{{if .IsResetForm}}
|
{{if .IsResetForm}}
|
||||||
<div class="required inline field {{if .Err_Password}}error{{end}}">
|
<div class="required inline field {{if .Err_Password}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
<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>
|
</div>
|
||||||
{{if not .user_signed_in}}
|
{{if not .user_signed_in}}
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{{if or (not .DisablePassword) .LinkAccountMode}}
|
{{if or (not .DisablePassword) .LinkAccountMode}}
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<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>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not .LinkAccountMode}}
|
{{if not .LinkAccountMode}}
|
||||||
|
|
|
@ -29,11 +29,11 @@
|
||||||
{{if not .DisablePassword}}
|
{{if not .DisablePassword}}
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
<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>
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
|
<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>
|
<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>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
|
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
|
||||||
|
|
|
@ -13,16 +13,16 @@
|
||||||
{{if .SignedUser.IsPasswordSet}}
|
{{if .SignedUser.IsPasswordSet}}
|
||||||
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
||||||
<label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
|
<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>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||||
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
<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>
|
||||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||||
<label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
|
<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>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
<input class="fake" type="password">
|
<input class="fake" type="password">
|
||||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||||
<label for="password-confirmation">{{.i18n.Tr "password"}}</label>
|
<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>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui red button delete-button" id="delete-account" data-type="form" data-form="#delete-form">
|
<div class="ui red button delete-button" id="delete-account" data-type="form" data-form="#delete-form">
|
||||||
|
|
Loading…
Reference in a new issue