forgejo/templates/user/auth/oauth_container.tmpl
0ko 339814f3bc fix(ui): show oauth divider on signup page (#6463)
Fix a minor UI bug introduced in https://codeberg.org/forgejo/forgejo/pulls/6112.

The condition `if .EnableInternalSignIn` was added to display of the divider, but it is only available when `oauth_container.tmpl` is called from signIn page, it is not relevant to signUp page.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6463
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-01-04 08:45:08 +00:00

31 lines
1.3 KiB
Go HTML Template

{{if or .OAuth2Providers .EnableOpenIDSignIn}}
{{if or (and .PageIsSignUp (not .DisableRegistration)) (and .PageIsSignIn .EnableInternalSignIn)}}
<div class="divider divider-text">
{{ctx.Locale.Tr "sign_in_or"}}
</div>
{{end}}
<div id="oauth2-login-navigator" class="tw-py-1">
<div class="tw-flex tw-flex-col tw-justify-center">
<div id="oauth2-login-navigator-inner" class="tw-flex tw-flex-col tw-flex-wrap tw-items-center tw-gap-2">
{{range $provider := .OAuth2Providers}}
<a class="{{$provider.Name}} ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
{{$provider.IconHTML 28}}
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}}
</a>
{{end}}
{{if .EnableOpenIDSignIn}}
<a class="openid ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" href="{{AppSubUrl}}/user/login/openid">
{{svg "fontawesome-openid" 28 "tw-mr-2"}}
{{ctx.Locale.Tr "auth.sign_in_openid"}}
</a>
{{end}}
{{if .EnableSSPI}}
<a class="ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1">
{{svg "fontawesome-windows"}}
&nbsp;SSPI
</a>
{{end}}
</div>
</div>
</div>
{{end}}