File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ func NewAuthSource(ctx *context.Context) {
93
93
ctx .Data ["PageIsAdmin" ] = true
94
94
ctx .Data ["PageIsAdminAuthentications" ] = true
95
95
96
- ctx .Data ["type" ] = auth .LDAP
96
+ ctx .Data ["type" ] = auth .LDAP . Int ()
97
97
ctx .Data ["CurrentTypeName" ] = auth .Names [auth .LDAP ]
98
98
ctx .Data ["CurrentSecurityProtocol" ] = ldap .SecurityProtocolNames [ldap .SecurityProtocolUnencrypted ]
99
99
ctx .Data ["smtp_auth" ] = "PLAIN"
@@ -112,7 +112,7 @@ func NewAuthSource(ctx *context.Context) {
112
112
ctx .Data ["SSPIDefaultLanguage" ] = ""
113
113
114
114
// only the first as default
115
- ctx .Data ["oauth2_provider" ] = oauth2providers [0 ]
115
+ ctx .Data ["oauth2_provider" ] = oauth2providers [0 ]. Name
116
116
117
117
ctx .HTML (http .StatusOK , tplAuthNew )
118
118
}
Original file line number Diff line number Diff line change 14
14
<div class="inline required field {{if .Err_Type}}error{{end}}">
15
15
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
16
16
<div class="ui selection type dropdown">
17
- <input type="hidden" id="auth_type" name="type" value="{{.type.Int }}">
17
+ <input type="hidden" id="auth_type" name="type" value="{{.type}}">
18
18
<div class="text">{{.CurrentTypeName}}</div>
19
19
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
20
20
<div class="menu">
Original file line number Diff line number Diff line change 2
2
<div class="inline required field">
3
3
<label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
4
4
<div class="ui selection type dropdown">
5
- <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider.Name }}">
6
- <div class="text">{{.oauth2_provider.Name }}</div>
5
+ <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
6
+ <div class="text">{{.oauth2_provider}}</div>
7
7
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
8
8
<div class="menu">
9
9
{{range .OAuth2Providers}}
You can’t perform that action at this time.
0 commit comments