diff options
author | Unknwon <u@gogs.io> | 2016-07-08 07:25:09 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-08 07:25:09 +0800 |
commit | 401bf944ef4b09e7d4ca85d7272dbd32e7e950a0 (patch) | |
tree | 7e9af9199616f4704d4e1e9e0bfcf97d537693e4 /templates/admin/auth/new.tmpl | |
parent | 326c98266040a69ceec51c3804c372c7af47e027 (diff) |
Use SecurityProtocol to replace UseSSL in LDAP config
Initially proposed by #2376 and fixes #3068 as well.
Diffstat (limited to 'templates/admin/auth/new.tmpl')
-rw-r--r-- | templates/admin/auth/new.tmpl | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 418f21da..55b6b14c 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -16,7 +16,7 @@ <label>{{.i18n.Tr "admin.auths.auth_type"}}</label> <div class="ui selection type dropdown"> <input type="hidden" id="auth_type" name="type" value="{{.type}}"> - <div class="text">{{.CurTypeName}}</div> + <div class="text">{{.CurrentTypeName}}</div> <i class="dropdown icon"></i> <div class="menu"> {{range .AuthSources}} @@ -32,6 +32,19 @@ <!-- LDAP and DLDAP --> <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}"> + <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> + <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label> + <div class="ui selection security-protocol dropdown"> + <input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}"> + <div class="text">{{.CurrentSecurityProtocol}}</div> + <i class="dropdown icon"></i> + <div class="menu"> + {{range .SecurityProtocols}} + <div class="item" data-value="{{.Type}}">{{.Name}}</div> + {{end}} + </div> + </div> + </div> <div class="required field"> <label for="host">{{.i18n.Tr "admin.auths.host"}}</label> <input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com"> @@ -126,13 +139,13 @@ <input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}> </div> </div> - <div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}"> + <div class="smtp inline field {{if not (eq .type 3)}}hide{{end}}"> <div class="ui checkbox"> <label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label> <input name="tls" type="checkbox" {{if .tls}}checked{{end}}> </div> </div> - <div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}"> + <div class="has-tls inline field {{if not .HasTLS}}hide{{end}}"> <div class="ui checkbox"> <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label> <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}> |