Fix login.tmpl rendering

This passes in the correct field named GitlabDisplayName.
pull/283/head
Matt Baer 5 years ago
parent 06054a2cd7
commit 79a968f425
  1. 16
      account.go
  2. 2
      pages/login.tmpl

@ -302,14 +302,14 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error {
p := &struct {
page.StaticPage
To string
Message template.HTML
Flashes []template.HTML
LoginUsername string
OauthSlack bool
OauthWriteAs bool
OauthGitlab bool
GitlabHost string
To string
Message template.HTML
Flashes []template.HTML
LoginUsername string
OauthSlack bool
OauthWriteAs bool
OauthGitlab bool
GitlabDisplayName string
}{
pageForReq(app, r),
r.FormValue("to"),

@ -55,7 +55,7 @@ hr.short {
<a class="btn cta loginbtn" id="writeas-login" href="/oauth/write.as">Sign in with <strong>Write.as</strong></a>
{{ end }}
{{ if .OauthGitlab }}
<a class="btn cta loginbtn" id="gitlab-login" href="/oauth/gitlab">Sign in with <strong>{{ .GitlabDisplayName }}</strong></a>
<a class="btn cta loginbtn" id="gitlab-login" href="/oauth/gitlab">Sign in with <strong>{{.GitlabDisplayName}}</strong></a>
{{ end }}
</div>

Loading…
Cancel
Save