mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 12:54:53 -05:00
Hide the registration button depending on the setting
This commit is contained in:
parent
79f3281548
commit
3c65265871
2 changed files with 3 additions and 0 deletions
|
@ -41,6 +41,7 @@ func Home(ctx *middleware.Context) {
|
||||||
ctx.Data["OauthEnabled"] = true
|
ctx.Data["OauthEnabled"] = true
|
||||||
ctx.Data["OauthService"] = setting.OauthService
|
ctx.Data["OauthService"] = setting.OauthService
|
||||||
}
|
}
|
||||||
|
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
|
||||||
|
|
||||||
ctx.Data["PageIsHome"] = true
|
ctx.Data["PageIsHome"] = true
|
||||||
ctx.HTML(200, HOME)
|
ctx.HTML(200, HOME)
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
<input class="ipt ipt-large" name="password" type="password" placeholder="{{.i18n.Tr "home.password_holder"}}"/>
|
<input class="ipt ipt-large" name="password" type="password" placeholder="{{.i18n.Tr "home.password_holder"}}"/>
|
||||||
<input name="from" type="hidden" value="home">
|
<input name="from" type="hidden" value="home">
|
||||||
<button class="btn btn-black btn-large">{{.i18n.Tr "sign_in"}}</button>
|
<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>
|
<button class="btn btn-green btn-large" id="register-button">{{.i18n.Tr "register"}}</button>
|
||||||
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
<div id="promo-social" class="social-buttons">
|
<div id="promo-social" class="social-buttons">
|
||||||
{{template "ng/base/social" .}}
|
{{template "ng/base/social" .}}
|
||||||
|
|
Loading…
Reference in a new issue