summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSergio Benitez <sbenitez@mit.edu>2015-08-12 16:58:27 -0700
committerSergio Benitez <sbenitez@mit.edu>2015-08-12 17:01:22 -0700
commit7d84d4a8f0cb30df04241f528ed74672a485274a (patch)
treee42a4d0163ac9573a75ea47e6659a8761e78d936 /templates
parent631c85ba4f51d3fe910324595c154dfaf25935d2 (diff)
downloadgitea-7d84d4a8f0cb30df04241f528ed74672a485274a.tar.gz
gitea-7d84d4a8f0cb30df04241f528ed74672a485274a.zip
Significantly enhanced LDAP support in Gogs.
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/auth/edit.tmpl32
-rw-r--r--templates/admin/auth/new.tmpl32
2 files changed, 32 insertions, 32 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 12d1d1f8f2..2af8d54131 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -32,10 +32,6 @@
{{if eq $type 2}}
<div class="field">
- <label class="req" for="domain">{{.i18n.Tr "admin.auths.domain"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Domain}}ipt-error{{end}}" id="domain" name="domain" value="{{.Source.LDAP.Name}}" required />
- </div>
- <div class="field">
<label class="req" for="host">{{.i18n.Tr "admin.auths.host"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Host}}ipt-error{{end}}" id="host" name="host" value="{{.Source.LDAP.Host}}" required />
</div>
@@ -44,12 +40,24 @@
<input class="ipt ipt-large ipt-radius {{if .Err_Port}}ipt-error{{end}}" id="port" name="port" value="{{.Source.LDAP.Port}}" required />
</div>
<div class="field">
- <label class="req" for="base_dn">{{.i18n.Tr "admin.auths.base_dn"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_BaseDN}}ipt-error{{end}}" id="base_dn" name="base_dn" value="{{.Source.LDAP.BaseDN}}" />
+ <label for="use_ssl">{{.i18n.Tr "admin.auths.enable_tls"}}</label>
+ <input name="use_ssl" type="checkbox" {{if .Source.LDAP.UseSSL}}checked{{end}}>
+ </div>
+ <div class="field">
+ <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_BindDN}}ipt-error{{end}}" id="bind_dn" name="bind_dn" value="{{.Source.LDAP.BindDN}}" />
+ </div>
+ <div class="field">
+ <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_BindPassword}}ipt-error{{end}}" id="bind_password" name="bind_password" value="{{.Source.LDAP.BindPassword}}" />
+ </div>
+ <div class="field">
+ <label class="req" for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_UserBase}}ipt-error{{end}}" id="user_base" name="user_base" value="{{.Source.LDAP.UserBase}}" />
</div>
<div class="field">
- <label class="req" for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attribute_username" name="attribute_username" value="{{.Source.LDAP.AttributeUsername}}" />
+ <label class="req" for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Filter}}ipt-error{{end}}" id="filter" name="filter" value="{{.Source.LDAP.Filter}}" />
</div>
<div class="field">
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
@@ -63,14 +71,6 @@
<label class="req" for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attribute_mail" name="attribute_mail" value="{{.Source.LDAP.AttributeMail}}" />
</div>
- <div class="field">
- <label class="req" for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Filter}}ipt-error{{end}}" id="filter" name="filter" value="{{.Source.LDAP.Filter}}" />
- </div>
- <div class="field">
- <label class="req" for="ms_ad_sa">{{.i18n.Tr "admin.auths.ms_ad_sa"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_MsAdSA}}ipt-error{{end}}" id="ms_ad_sa" name="ms_ad_sa" value="{{.Source.LDAP.MsAdSAFormat}}" />
- </div>
{{else if eq $type 3}}
<div class="field">
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index 36b90cfb48..bad90cc419 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -28,10 +28,6 @@
</div>
<div class="ldap">
<div class="field">
- <label class="req" for="domain">{{.i18n.Tr "admin.auths.domain"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Domain}}ipt-error{{end}}" id="domain" name="domain" value="{{.domain}}" />
- </div>
- <div class="field">
<label class="req" for="host">{{.i18n.Tr "admin.auths.host"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Host}}ipt-error{{end}}" id="host" name="host" value="{{.host}}" />
</div>
@@ -40,12 +36,24 @@
<input class="ipt ipt-large ipt-radius {{if .Err_Port}}ipt-error{{end}}" id="port" name="port" value="{{.port}}" />
</div>
<div class="field">
- <label class="req" for="base_dn">{{.i18n.Tr "admin.auths.base_dn"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_BaseDN}}ipt-error{{end}}" id="base_dn" name="base_dn" value="{{.base_dn}}" />
+ <label for="use_ssl">{{.i18n.Tr "admin.auths.enable_tls"}}</label>
+ <input name="use_ssl" type="checkbox" {{if .use_ssl}}checked{{end}}>
+ </div>
+ <div class="field">
+ <label class="req" for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_BindDN}}ipt-error{{end}}" id="bind_dn" name="bind_dn" value="{{.bind_dn}}" />
+ </div>
+ <div class="field">
+ <label class="req" for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_BindPassword}}ipt-error{{end}}" id="bind_password" name="bind_password" value="{{.bind_password}}" />
+ </div>
+ <div class="field">
+ <label class="req" for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_UserBase}}ipt-error{{end}}" id="user_base" name="user_base" value="{{.user_base}}" />
</div>
<div class="field">
- <label class="req" for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_AttributeUsername}}ipt-error{{end}}" id="attribute_username" name="attribute_username" value="{{.attribute_username}}" />
+ <label class="req" for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Filter}}ipt-error{{end}}" id="filter" name="filter" value="{{.filter}}" />
</div>
<div class="field">
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
@@ -59,14 +67,6 @@
<label class="req" for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_AttributeMail}}ipt-error{{end}}" id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" />
</div>
- <div class="field">
- <label class="req" for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Filter}}ipt-error{{end}}" id="filter" name="filter" value="{{.filter}}" />
- </div>
- <div class="field">
- <label class="req" for="ms_ad_sa">{{.i18n.Tr "admin.auths.ms_ad_sa"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_MsAdSA}}ipt-error{{end}}" id="ms_ad_sa" name="ms_ad_sa" value="{{.ms_ad_sa}}" />
- </div>
</div>
<div class="smtp hidden">
<div class="field">