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

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

{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}} {{.CsrfTokenHtml}} {{if .SignedUser.IsPasswordSet}}
{{.i18n.Tr "settings.old_password"}}
{{end}}
{{.i18n.Tr "settings.new_password"}}
{{.i18n.Tr "settings.retype_new_password"}}
{{.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"}}

{{$.i18n.Tr "settings.twofa_enroll"}}
{{end}}
{{.i18n.Tr "settings.twofa_disable"}}

{{.i18n.Tr "settings.twofa_disable_desc"}}

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