From d4d35d5f177a02d604dc623d70f5737d739b2b52 Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Fri, 14 Oct 2022 22:19:55 +0200 Subject: [PATCH] gitea: signin template --- .../files/tmpl/user/auth/signin_inner.tmpl | 76 +++++++++++++++++++ .../tmpl/user/auth/signin_inner.tmpl.main | 76 +++++++++++++++++++ .../tmpl/user/auth/signin_inner.tmpl.v1.17 | 76 +++++++++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 roles/gitea/files/tmpl/user/auth/signin_inner.tmpl create mode 100644 roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.main create mode 100644 roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.v1.17 diff --git a/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl b/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl new file mode 100644 index 0000000..20a286a --- /dev/null +++ b/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl @@ -0,0 +1,76 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

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

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ {{if or (not .DisablePassword) .LinkAccountMode}} +
+ + +
+ {{end}} + {{if not .LinkAccountMode}} +
+ +
+ + +
+
+ {{end}} + +
+ + + {{.i18n.Tr "auth.forgot_password"}} +
+ + {{if .ShowRegistrationButton}} + + {{end}} + + {{if and .OrderedOAuth2Names .OAuth2Providers}} +
+
+
+
+
+

{{.i18n.Tr "sign_in_with"}}

+ {{range $key := .OrderedOAuth2Names}} + {{$provider := index $.OAuth2Providers $key}} + + + {{end}} +
+
+
+
+ {{end}} +
+
diff --git a/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.main b/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.main new file mode 100644 index 0000000..18875f4 --- /dev/null +++ b/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.main @@ -0,0 +1,76 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

+ {{if .LinkAccountMode}} + {{.locale.Tr "auth.oauth_signin_title"}} + {{else}} + {{.locale.Tr "auth.login_userpass"}} + {{end}} +

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ {{if or (not .DisablePassword) .LinkAccountMode}} +
+ + +
+ {{end}} + {{if not .LinkAccountMode}} +
+ +
+ + +
+
+ {{end}} + +
+ + + {{.locale.Tr "auth.forgot_password"}} +
+ + {{if .ShowRegistrationButton}} + + {{end}} + + {{if and .OrderedOAuth2Names .OAuth2Providers}} +
+
+
+
+
+

{{.locale.Tr "sign_in_with"}}

+ {{range $key := .OrderedOAuth2Names}} + {{$provider := index $.OAuth2Providers $key}} + + + {{end}} +
+
+
+
+ {{end}} +
+
diff --git a/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.v1.17 b/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.v1.17 new file mode 100644 index 0000000..20a286a --- /dev/null +++ b/roles/gitea/files/tmpl/user/auth/signin_inner.tmpl.v1.17 @@ -0,0 +1,76 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

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

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ {{if or (not .DisablePassword) .LinkAccountMode}} +
+ + +
+ {{end}} + {{if not .LinkAccountMode}} +
+ +
+ + +
+
+ {{end}} + +
+ + + {{.i18n.Tr "auth.forgot_password"}} +
+ + {{if .ShowRegistrationButton}} + + {{end}} + + {{if and .OrderedOAuth2Names .OAuth2Providers}} +
+
+
+
+
+

{{.i18n.Tr "sign_in_with"}}

+ {{range $key := .OrderedOAuth2Names}} + {{$provider := index $.OAuth2Providers $key}} + + + {{end}} +
+
+
+
+ {{end}} +
+
-- 2.40.1