From ec4c27b6b770e549948a942b385e92b3d7ebb75c Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 2 Sep 2021 13:14:37 +0100 Subject: [PATCH] Prevent leave changes dialogs due to autofill fields (#16912) Backport #16912 Add ignore-dirty to /user/settings/account Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings Fix #16861 Signed-off-by: Andrew Thornton --- templates/repo/settings/options.tmpl | 2 +- templates/user/settings/account.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 054df7c36899c..4054158544f7b 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -198,7 +198,7 @@
- +

{{.i18n.Tr "repo.mirror_address_desc"}}

diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 2e1976aaa9577..fa14369660846 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -8,7 +8,7 @@
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}} -
+ {{.CsrfTokenHtml}} {{if .SignedUser.IsPasswordSet}}