mirror of
https://github.com/writefreely/writefreely
synced 2024-11-27 19:10:17 +00:00
Update signup-via-invite page
This updates signup.tmpl to include all supported OAuth methods and respect the new `DisablePasswordAuth` config value.
This commit is contained in:
parent
4db2cb8986
commit
00cceca104
2 changed files with 7 additions and 22 deletions
|
@ -170,14 +170,14 @@ func handleViewInvite(app *App, w http.ResponseWriter, r *http.Request) error {
|
||||||
|
|
||||||
p := struct {
|
p := struct {
|
||||||
page.StaticPage
|
page.StaticPage
|
||||||
|
*OAuthButtons
|
||||||
Error string
|
Error string
|
||||||
Flashes []template.HTML
|
Flashes []template.HTML
|
||||||
Invite string
|
Invite string
|
||||||
OAuth *OAuthButtons
|
|
||||||
}{
|
}{
|
||||||
StaticPage: pageForReq(app, r),
|
StaticPage: pageForReq(app, r),
|
||||||
Invite: inviteCode,
|
OAuthButtons: NewOAuthButtons(app.cfg),
|
||||||
OAuth: NewOAuthButtons(app.cfg),
|
Invite: inviteCode,
|
||||||
}
|
}
|
||||||
|
|
||||||
if expired {
|
if expired {
|
||||||
|
|
|
@ -70,25 +70,9 @@ form dd {
|
||||||
</ul>{{end}}
|
</ul>{{end}}
|
||||||
|
|
||||||
<div id="billing">
|
<div id="billing">
|
||||||
{{ if or .OAuth.SlackEnabled .OAuth.WriteAsEnabled .OAuth.GitLabEnabled }}
|
{{template "oauth-buttons" .}}
|
||||||
<div class="row content-container signinbtns">
|
|
||||||
{{ if .OAuth.SlackEnabled }}
|
|
||||||
<a class="loginbtn" href="/oauth/slack{{if .Invite}}?invite_code={{.Invite}}{{end}}"><img alt="Sign in with Slack" height="40" width="172" src="/img/sign_in_with_slack.png" srcset="/img/sign_in_with_slack.png 1x, /img/sign_in_with_slack@2x.png 2x" /></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .OAuth.WriteAsEnabled }}
|
|
||||||
<a class="btn cta loginbtn" id="writeas-login" href="/oauth/write.as{{if .Invite}}?invite_code={{.Invite}}{{end}}">Sign in with <strong>Write.as</strong></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .OAuth.GitLabEnabled }}
|
|
||||||
<a class="btn cta loginbtn" id="gitlab-login" href="/oauth/gitlab{{if .Invite}}?invite_code={{.Invite}}{{end}}">Sign in with <strong>{{.OAuth.GitLabDisplayName}}</strong></a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="or">
|
|
||||||
<p>or</p>
|
|
||||||
<hr class="short" />
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
|
{{if not .DisablePasswordAuth}}
|
||||||
<form action="/auth/signup" method="POST" id="signup-form" onsubmit="return signup()">
|
<form action="/auth/signup" method="POST" id="signup-form" onsubmit="return signup()">
|
||||||
<input type="hidden" name="invite_code" value="{{.Invite}}" />
|
<input type="hidden" name="invite_code" value="{{.Invite}}" />
|
||||||
<dl class="billing">
|
<dl class="billing">
|
||||||
|
@ -112,6 +96,7 @@ form dd {
|
||||||
</dt>
|
</dt>
|
||||||
</dl>
|
</dl>
|
||||||
</form>
|
</form>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue