mirror of
https://github.com/writefreely/writefreely
synced 2024-11-28 03:20:17 +00:00
Fix: signup methods mutually exclusive
This commit is contained in:
parent
d3f1e40010
commit
ab285644a0
3 changed files with 7 additions and 10 deletions
|
@ -325,8 +325,8 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error {
|
|||
app.Config().SlackOauth.ClientID != "",
|
||||
app.Config().WriteAsOauth.ClientID != "",
|
||||
app.Config().GitlabOauth.ClientID != "",
|
||||
app.Config().GenericOauth.ClientID != "",
|
||||
config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName),
|
||||
app.Config().GenericOauth.ClientID != "",
|
||||
config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName),
|
||||
app.Config().GiteaOauth.ClientID != "",
|
||||
config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName),
|
||||
|
|
|
@ -20,8 +20,6 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
wf_db "github.com/writeas/writefreely/db"
|
||||
|
||||
"github.com/guregu/null"
|
||||
"github.com/guregu/null/zero"
|
||||
uuid "github.com/nu7hatch/gouuid"
|
||||
|
|
|
@ -78,7 +78,6 @@ form dd {
|
|||
|
||||
<div{{if not .OpenRegistration}} style="padding: 2em 0;"{{end}}>
|
||||
{{ if .OpenRegistration }}
|
||||
{{if .DisablePasswordAuth}}
|
||||
{{ if or .OauthSlack .OauthWriteAs .OauthGitlab .OauthGeneric }}
|
||||
{{ if .OauthSlack }}
|
||||
<div class="row content-container signinbtns signinoauthbtns"><a class="loginbtn" href="/oauth/slack"><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></div>
|
||||
|
@ -93,7 +92,7 @@ form dd {
|
|||
<div class="row content-container signinbtns signinoauthbtns"><a class="btn cta loginbtn" id="generic-oauth-login" href="/oauth/generic">Sign in with <strong>{{ .OauthGenericDisplayName }}</strong></a></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{if not .DisablePasswordAuth}}
|
||||
{{if .Flashes}}<ul class="errors">
|
||||
{{range .Flashes}}<li class="urgent">{{.}}</li>{{end}}
|
||||
</ul>{{end}}
|
||||
|
|
Loading…
Reference in a new issue