summaryrefslogtreecommitdiffstats
path: root/templates/admin
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/admin
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/admin')
-rw-r--r--templates/admin/auth/source/ldap.tmpl2
-rw-r--r--templates/admin/user/edit.tmpl2
-rw-r--r--templates/admin/user/new.tmpl2
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl
index 651877b1f7..6feb202abb 100644
--- a/templates/admin/auth/source/ldap.tmpl
+++ b/templates/admin/auth/source/ldap.tmpl
@@ -27,7 +27,7 @@
<input class="fake" type="password">
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
<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>
</div>
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index 042c09954a..95323a97b2 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -43,7 +43,7 @@
<input class="fake" type="password">
<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>
- <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>
</div>
<div class="field {{if .Err_Website}}error{{end}}">
diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl
index 44cd0049b7..463374dab7 100644
--- a/templates/admin/user/new.tmpl
+++ b/templates/admin/user/new.tmpl
@@ -39,7 +39,7 @@
<input class="fake" type="password">
<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>
- <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 class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">