show "back" link for password connectors
This way, the user who has selected, say, "Log in with Email" can make up their mind, and select a different connector instead. However, if there's only one connector set up, none of this makes sense -- and the link will thus not be displayed. Signed-off-by: Stephan Renatus <srenatus@chef.io>
This commit is contained in:
@@ -190,13 +190,14 @@ func (t *templates) login(w http.ResponseWriter, connectors []connectorInfo) err
|
||||
return renderTemplate(w, t.loginTmpl, data)
|
||||
}
|
||||
|
||||
func (t *templates) password(w http.ResponseWriter, postURL, lastUsername, usernamePrompt string, lastWasInvalid bool) error {
|
||||
func (t *templates) password(w http.ResponseWriter, postURL, lastUsername, usernamePrompt string, lastWasInvalid, showBacklink bool) error {
|
||||
data := struct {
|
||||
PostURL string
|
||||
BackLink bool
|
||||
Username string
|
||||
UsernamePrompt string
|
||||
Invalid bool
|
||||
}{postURL, lastUsername, usernamePrompt, lastWasInvalid}
|
||||
}{postURL, showBacklink, lastUsername, usernamePrompt, lastWasInvalid}
|
||||
return renderTemplate(w, t.passwordTmpl, data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user