diff options
author | Raphael Randschau <nicolai86@me.com> | 2015-02-05 17:09:38 +0100 |
---|---|---|
committer | Raphael Randschau <nicolai86@me.com> | 2015-02-05 18:15:00 +0100 |
commit | 3c65265871ce6d8305250ef870a751ebf47257ea (patch) | |
tree | 0369f17e573b034dc5e3503f8aa209da06369328 | |
parent | 79f328154841152d1add7d2035ff125a6ccc5e25 (diff) | |
download | gitea-3c65265871ce6d8305250ef870a751ebf47257ea.tar.gz gitea-3c65265871ce6d8305250ef870a751ebf47257ea.zip |
Hide the registration button depending on the setting
-rw-r--r-- | routers/home.go | 1 | ||||
-rw-r--r-- | templates/home.tmpl | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/routers/home.go b/routers/home.go index dd604ec7e3..24fc77e12a 100644 --- a/routers/home.go +++ b/routers/home.go @@ -41,6 +41,7 @@ func Home(ctx *middleware.Context) { ctx.Data["OauthEnabled"] = true ctx.Data["OauthService"] = setting.OauthService } + ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["PageIsHome"] = true ctx.HTML(200, HOME) diff --git a/templates/home.tmpl b/templates/home.tmpl index 8603f26f41..29865dbf9a 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -14,7 +14,9 @@ <input class="ipt ipt-large" name="password" type="password" placeholder="{{.i18n.Tr "home.password_holder"}}"/> <input name="from" type="hidden" value="home"> <button class="btn btn-black btn-large">{{.i18n.Tr "sign_in"}}</button> + {{if .ShowRegistrationButton}} <button class="btn btn-green btn-large" id="register-button">{{.i18n.Tr "register"}}</button> + {{end}} </form> <div id="promo-social" class="social-buttons"> {{template "ng/base/social" .}} |