diff --git a/account.go b/account.go index 0c83ad4..dd27ee2 100644 --- a/account.go +++ b/account.go @@ -325,6 +325,7 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error { To string Message template.HTML Flashes []template.HTML + EmailEnabled bool LoginUsername string }{ StaticPage: pageForReq(app, r), @@ -332,6 +333,7 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error { To: r.FormValue("to"), Message: template.HTML(""), Flashes: []template.HTML{}, + EmailEnabled: app.cfg.Email.Enabled(), LoginUsername: getTempInfo(app, "login-user", r, w), } diff --git a/pages/login.tmpl b/pages/login.tmpl index 29cc6d6..ae11edb 100644 --- a/pages/login.tmpl +++ b/pages/login.tmpl @@ -22,7 +22,7 @@ p.forgot {


-

Forgot password?

+ {{if .EmailEnabled}}

Forgot password?

{{end}} {{if .To}}{{end}}