From 0857e289d5b2a5de4d85dfb6d653788c2d27035f Mon Sep 17 00:00:00 2001 From: David Schneiderbauer Date: Sat, 19 May 2018 03:02:04 +0200 Subject: [PATCH] fix links to prevent 404 after e.g. submitting a faulty form (#3982) --- templates/user/settings/account.tmpl | 10 +++++----- templates/user/settings/security_accountlinks.tmpl | 2 +- templates/user/settings/security_openid.tmpl | 6 +++--- templates/user/settings/security_twofa.tmpl | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 290745222d..56c3df7f84 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}}
@@ -49,13 +49,13 @@
{{if not .IsPrimary}}
-
{{if .IsActivated}}
- + {{$.CsrfTokenHtml}} @@ -73,7 +73,7 @@
- + {{.CsrfTokenHtml}}
@@ -92,7 +92,7 @@

{{.i18n.Tr "settings.delete_prompt" | Str2html}}

- + {{.CsrfTokenHtml}}
diff --git a/templates/user/settings/security_accountlinks.tmpl b/templates/user/settings/security_accountlinks.tmpl index 93cc508a54..057a0f9aff 100644 --- a/templates/user/settings/security_accountlinks.tmpl +++ b/templates/user/settings/security_accountlinks.tmpl @@ -10,7 +10,7 @@ {{range $loginSource, $provider := .AccountLinks}}
-
diff --git a/templates/user/settings/security_openid.tmpl b/templates/user/settings/security_openid.tmpl index 12f4aab419..82a05f3885 100644 --- a/templates/user/settings/security_openid.tmpl +++ b/templates/user/settings/security_openid.tmpl @@ -9,12 +9,12 @@ {{range .OpenIDs}}
-
- + {{$.CsrfTokenHtml}} {{if .Show}} @@ -39,7 +39,7 @@
- + {{.CsrfTokenHtml}}
diff --git a/templates/user/settings/security_twofa.tmpl b/templates/user/settings/security_twofa.tmpl index 05112a21bb..138872d317 100644 --- a/templates/user/settings/security_twofa.tmpl +++ b/templates/user/settings/security_twofa.tmpl @@ -5,12 +5,12 @@

{{.i18n.Tr "settings.twofa_desc"}}

{{if .TwofaEnrolled}}

{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}

- + {{.CsrfTokenHtml}}

{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}

-
+ {{.CsrfTokenHtml}}

{{.i18n.Tr "settings.twofa_disable_note"}}

{{$.i18n.Tr "settings.twofa_disable"}}
@@ -18,7 +18,7 @@ {{else}}

{{.i18n.Tr "settings.twofa_not_enrolled"}}

{{end}}