summaryrefslogtreecommitdiffstats
path: root/templates/user/auth
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-10-09 09:32:30 +0200
committerGitHub <noreply@github.com>2020-10-09 10:32:30 +0300
commit1c523e212913cdb6fc2b0709af7f4c910d1728c8 (patch)
tree8a0f236537c952f38809ed44fcf06644c02b2d66 /templates/user/auth
parentea69ec6f0feb357b82dc2572f88184db507e383b (diff)
downloadgitea-1c523e212913cdb6fc2b0709af7f4c910d1728c8.tar.gz
gitea-1c523e212913cdb6fc2b0709af7f4c910d1728c8.zip
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>
Diffstat (limited to 'templates/user/auth')
-rw-r--r--templates/user/auth/change_passwd_inner.tmpl4
-rw-r--r--templates/user/auth/reset_passwd.tmpl2
-rw-r--r--templates/user/auth/signin_inner.tmpl2
-rw-r--r--templates/user/auth/signup_inner.tmpl4
4 files changed, 6 insertions, 6 deletions
diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl
index 60d4a210ee..43818e93d2 100644
--- a/templates/user/auth/change_passwd_inner.tmpl
+++ b/templates/user/auth/change_passwd_inner.tmpl
@@ -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">
diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl
index 91d5a5ef88..7d60fe4a86 100644
--- a/templates/user/auth/reset_passwd.tmpl
+++ b/templates/user/auth/reset_passwd.tmpl
@@ -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">
diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl
index 9f6b3da05d..4d99d378ad 100644
--- a/templates/user/auth/signin_inner.tmpl
+++ b/templates/user/auth/signin_inner.tmpl
@@ -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}}
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl
index e52aa2e881..57dd22db4c 100644
--- a/templates/user/auth/signup_inner.tmpl
+++ b/templates/user/auth/signup_inner.tmpl
@@ -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")}}