From c70fa161547f477d4d67c6b343b565261cf9d6f6 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 5 Oct 2018 04:45:24 +0000 Subject: [PATCH] use tabs to switch between account link flows --- options/locale/locale_en-US.ini | 8 +++++-- templates/user/auth/link_account.tmpl | 32 ++++++++++++++++++--------- templates/user/auth/signin_inner.tmpl | 14 ++++++++++-- templates/user/auth/signup_inner.tmpl | 10 +++++++-- 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 13bc9e467..b6ca4b7d6 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -4,13 +4,17 @@ home = Home dashboard = Dashboard explore = Explore help = Help +auth_link_signup_tab = Register New Account +auth_link_signup_title = Add Email and Password (for Account Recovery) +auth_link_signup_submit = Complete Account +auth_link_signin_tab = Link to Existing Account +auth_link_signin_title = Sign In to Authorize Linked Account +auth_link_signin_submit = Link Account sign_in = Sign In sign_in_with = Sign In With sign_out = Sign Out sign_up = Register -add_recovery = Add Email and Password (for Account Recovery) link_account = Link Account -link_account_signin_or_signup = Sign in with existing credentials to link your existing account to this account. Or register a new one. register = Register website = Website version = Version diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl index 098d904d2..50532939b 100644 --- a/templates/user/auth/link_account.tmpl +++ b/templates/user/auth/link_account.tmpl @@ -1,20 +1,30 @@ {{template "base/head" .}} + -{{if or .user_name_exists .email_exists}} -
-{{template "user/auth/signin_inner" .}} -
-{{else}} -{{template "user/auth/signup_inner" .}} -{{end}} - {{template "base/footer" .}} diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index 019bda570..a3da19ea7 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -2,7 +2,11 @@ {{template "base/alert" .}} {{end}}

- {{.i18n.Tr "auth.login_userpass"}} + {{if .LinkAccountMode}} + {{.i18n.Tr "auth_link_signin_title"}} + {{else}} + {{.i18n.Tr "auth.login_userpass"}} + {{end}}

@@ -27,7 +31,13 @@
- + {{.i18n.Tr "auth.forgot_password"}}
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl index 21b4558f6..793e916e8 100644 --- a/templates/user/auth/signup_inner.tmpl +++ b/templates/user/auth/signup_inner.tmpl @@ -5,7 +5,7 @@ {{.CsrfTokenHtml}}

{{if .LinkAccountMode}} - {{.i18n.Tr "add_recovery"}} + {{.i18n.Tr "auth_link_signup_title"}} {{else}} {{.i18n.Tr "sign_up"}} {{end}} @@ -51,7 +51,13 @@
- +
{{if not .LinkAccountMode}}