diff options
author | zeripath <art27@cantab.net> | 2022-03-10 22:40:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 23:40:43 +0100 |
commit | a223bc8765f18e1efc59d5291412d0076dfeaa9b (patch) | |
tree | 119ac7416597442fdc5a22eafbbdd788894dde4b /templates/admin/auth | |
parent | 886b1de94914186a502ed68a6a281a15f1d8d9a3 (diff) | |
download | gitea-a223bc8765f18e1efc59d5291412d0076dfeaa9b.tar.gz gitea-a223bc8765f18e1efc59d5291412d0076dfeaa9b.zip |
Prevent 500 when there is an error during new auth source post (#19041)
Fix #19036
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates/admin/auth')
-rw-r--r-- | templates/admin/auth/new.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/auth/source/oauth.tmpl | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index b8e80dbcaa..9882cde03b 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -14,7 +14,7 @@ <div class="inline required field {{if .Err_Type}}error{{end}}"> <label>{{.i18n.Tr "admin.auths.auth_type"}}</label> <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> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 85c7cb6166..3991dc2170 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -2,8 +2,8 @@ <div class="inline required field"> <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label> <div class="ui selection type dropdown"> - <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider.Name}}"> - <div class="text">{{.oauth2_provider.Name}}</div> + <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}"> + <div class="text">{{.oauth2_provider}}</div> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> {{range .OAuth2Providers}} |