diff options
author | Unknwon <u@gogs.io> | 2015-09-10 14:55:29 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-10 14:55:29 -0400 |
commit | cbd6276200751f4b64a203767f0f454c3346fca1 (patch) | |
tree | 9f0ad4f59e40dbb4f3cdad045611fce382fa9f8e /templates | |
parent | 52ec80fa18bf991c6356b7aa972a1d3983aa20c3 (diff) | |
parent | b954a22ce28d74021f0d4896e281aabc93eed938 (diff) | |
download | gitea-cbd6276200751f4b64a203767f0f454c3346fca1.tar.gz gitea-cbd6276200751f4b64a203767f0f454c3346fca1.zip |
Merge branch 'develop' of https://github.com/SergioBenitez/gogs into develop
# Conflicts:
# modules/bindata/bindata.go
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 17 | ||||
-rw-r--r-- | templates/admin/auth/new.tmpl | 28 |
2 files changed, 29 insertions, 16 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 6da77f1282..5569ce19e5 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -30,7 +30,7 @@ <input class="ipt ipt-large ipt-radius {{if .Err_AuthName}}ipt-error{{end}}" id="name" name="name" value="{{.Source.Name}}" required /> </div> - {{if eq $type 2}} + {{if eq $type 2 3}} <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 /> @@ -43,6 +43,7 @@ <label for="use_ssl">{{.i18n.Tr "admin.auths.enable_tls"}}</label> <input name="use_ssl" type="checkbox" {{if .Source.LDAP.UseSSL}}checked{{end}}> </div> + {{if eq $type 2}} <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}}" /> @@ -55,6 +56,13 @@ <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> + {{end}} + {{if eq $type 3}} + <div class="field"> + <label class="req" for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_UserDN}}ipt-error{{end}}" id="user_dn" name="user_dn" value="{{.Source.LDAP.UserDN}}" /> + </div> + {{end}} <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}}" /> @@ -76,7 +84,8 @@ <input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attribute_mail" name="attribute_mail" value="{{.Source.LDAP.AttributeMail}}" /> </div> - {{else if eq $type 3}} + + {{else if eq $type 4}} <div class="field"> <label class="req">{{.i18n.Tr "admin.auths.smtp_auth"}}</label> <select name="smtp_auth"> @@ -96,7 +105,7 @@ <input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtp_port" name="smtp_port" value="{{.Source.SMTP.Port}}" /> </div> - {{else if eq $type 4}} + {{else if eq $type 5}} <div class="field"> <label class="req" for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label> <input class="ipt ipt-large ipt-radius {{if .Err_PAMServiceName}}ipt-error{{end}}" id="pam_service_name" name="pam_service_name" value="{{.Source.PAM.ServiceName}}" /> @@ -104,7 +113,7 @@ {{end}} <div class="field"> - {{if eq $type 3}} + {{if eq $type 4}} <label></label> <input name="tls" type="checkbox" {{if .Source.SMTP.TLS}}checked{{end}}> <strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong> diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index f16db0a513..ca5d6be17b 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -26,48 +26,52 @@ <label class="req" for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label> <input class="ipt ipt-large ipt-radius {{if .Err_AuthName}}ipt-error{{end}}" id="name" name="name" value="{{.name}}" required /> </div> - <div class="ldap"> - <div class="field"> + <div class="dldap ldap"> + <div class="dldap ldap 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> - <div class="field"> + <div class="dldap ldap field"> <label class="req" for="port">{{.i18n.Tr "admin.auths.port"}}</label> <input class="ipt ipt-large ipt-radius {{if .Err_Port}}ipt-error{{end}}" id="port" name="port" value="{{.port}}" /> </div> - <div class="field"> + <div class="dldap ldap field"> <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"> + <div class="ldap 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"> + <div class="ldap 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" type="password" value="{{.bind_password}}" /> </div> - <div class="field"> + <div class="ldap 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"> + <div class="dldap field hidden"> + <label class="req" for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_UserDN}}ipt-error{{end}}" id="user_dn" name="user_dn" value="{{.user_dn}}" /> + </div> + <div class="dldap ldap 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"> + <div class="dldap ldap field"> <label for="filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label> <input class="ipt ipt-large ipt-radius {{if .Err_AdminFilter}}ipt-error{{end}}" id="admin_filter" name="admin_filter" value="{{.admin_filter}}" /> </div> - <div class="field"> + <div class="dldap ldap field"> <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label> <input class="ipt ipt-large ipt-radius {{if .Err_AttributeName}}ipt-error{{end}}" id="attribute_name" name="attribute_name" value="{{.attribute_name}}" /> </div> - <div class="field"> + <div class="dldap ldap field"> <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label> <input class="ipt ipt-large ipt-radius {{if .Err_AttributeSurname}}ipt-error{{end}}" id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}" /> </div> - <div class="field"> + <div class="dldap ldap field"> <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> |