{{template "base/head" .}}
{{template "user/settings/navbar" .}}
{{template "base/alert" .}}

{{.i18n.Tr "settings.password"}}

{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
{{.CsrfTokenHtml}} {{if .SignedUser.IsPasswordSet}}
{{end}}
{{.i18n.Tr "auth.forgot_password"}}
{{else}}

{{$.i18n.Tr "settings.password_change_disabled"}}

{{end}}

{{.i18n.Tr "settings.twofa"}}

{{.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"}}
{{else}}

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

{{end}}
{{template "base/footer" .}}