mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 10:07:51 +01:00
Backport #19041 Fix #19036 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
0fe99cc00c
commit
4df2320ba6
@ -93,7 +93,7 @@ func NewAuthSource(ctx *context.Context) {
|
|||||||
ctx.Data["PageIsAdmin"] = true
|
ctx.Data["PageIsAdmin"] = true
|
||||||
ctx.Data["PageIsAdminAuthentications"] = true
|
ctx.Data["PageIsAdminAuthentications"] = true
|
||||||
|
|
||||||
ctx.Data["type"] = auth.LDAP
|
ctx.Data["type"] = auth.LDAP.Int()
|
||||||
ctx.Data["CurrentTypeName"] = auth.Names[auth.LDAP]
|
ctx.Data["CurrentTypeName"] = auth.Names[auth.LDAP]
|
||||||
ctx.Data["CurrentSecurityProtocol"] = ldap.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted]
|
ctx.Data["CurrentSecurityProtocol"] = ldap.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted]
|
||||||
ctx.Data["smtp_auth"] = "PLAIN"
|
ctx.Data["smtp_auth"] = "PLAIN"
|
||||||
@ -112,7 +112,7 @@ func NewAuthSource(ctx *context.Context) {
|
|||||||
ctx.Data["SSPIDefaultLanguage"] = ""
|
ctx.Data["SSPIDefaultLanguage"] = ""
|
||||||
|
|
||||||
// only the first as default
|
// only the first as default
|
||||||
ctx.Data["oauth2_provider"] = oauth2providers[0]
|
ctx.Data["oauth2_provider"] = oauth2providers[0].Name
|
||||||
|
|
||||||
ctx.HTML(http.StatusOK, tplAuthNew)
|
ctx.HTML(http.StatusOK, tplAuthNew)
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
||||||
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||||
<div class="ui selection type dropdown">
|
<div class="ui selection type dropdown">
|
||||||
<input type="hidden" id="auth_type" name="type" value="{{.type.Int}}">
|
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
||||||
<div class="text">{{.CurrentTypeName}}</div>
|
<div class="text">{{.CurrentTypeName}}</div>
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
|
<label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
|
||||||
<div class="ui selection type dropdown">
|
<div class="ui selection type dropdown">
|
||||||
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider.Name}}">
|
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
|
||||||
<div class="text">{{.oauth2_provider.Name}}</div>
|
<div class="text">{{.oauth2_provider}}</div>
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
{{range .OAuth2Providers}}
|
{{range .OAuth2Providers}}
|
||||||
|
Loading…
Reference in New Issue
Block a user