diff options
author | zeripath <art27@cantab.net> | 2021-07-25 08:09:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 08:09:52 +0100 |
commit | 6a33b290a09b623bfb85d0bc03b2c7e6524ecf2d (patch) | |
tree | 331ec300f1aff93eedd9273cfb8f2a90f63028e6 /templates | |
parent | fd15fd4c67b22189a18765f888bb3f19e241acbe (diff) | |
download | gitea-6a33b290a09b623bfb85d0bc03b2c7e6524ecf2d.tar.gz gitea-6a33b290a09b623bfb85d0bc03b2c7e6524ecf2d.zip |
Fix add authentication page (#16543)
* Fix add authentication page
There is a regression in #16199 whereby the add authentication page
fails to react to the change in selected type.
This is due to the String() method on the LoginSourceType which is ameliorated
with an Int() function being added.
Following on from this there are a few other related bugs.
Fix #16541
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/auth/new.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/auth/source/ldap.tmpl | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 3fbfedefe7..22a2903b27 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -12,7 +12,7 @@ <input type="hidden" name="id" value="{{.Source.ID}}"> <div class="inline field"> <label>{{$.i18n.Tr "admin.auths.auth_type"}}</label> - <input type="hidden" id="auth_type" name="type" value="{{.Source.Type}}"> + <input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}"> <span>{{.Source.TypeName}}</span> </div> <div class="required inline field {{if .Err_Name}}error{{end}}"> @@ -31,7 +31,7 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> {{range .SecurityProtocols}} - <div class="item" data-value="{{.Type}}">{{.Name}}</div> + <div class="item" data-value="{{.Type.Int}}">{{.Name}}</div> {{end}} </div> </div> diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 302132e06b..6addc50d09 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -13,12 +13,12 @@ <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}}"> + <input type="hidden" id="auth_type" name="type" value="{{.type.Int}}"> <div class="text">{{.CurrentTypeName}}</div> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> {{range .AuthSources}} - <div class="item" data-value="{{.Type}}">{{.Name}}</div> + <div class="item" data-value="{{.Type.Int}}">{{.Name}}</div> {{end}} </div> </div> diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index 1cbcb2fd41..0b7ad7a4da 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -7,7 +7,7 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> {{range .SecurityProtocols}} - <div class="item" data-value="{{.Type}}">{{.Name}}</div> + <div class="item" data-value="{{.Type.Int}}">{{.Name}}</div> {{end}} </div> </div> |