summaryrefslogtreecommitdiffstats
path: root/templates/admin/auth
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-03-24 19:04:16 -0400
committerUnknwon <u@gogs.io>2015-03-24 19:04:16 -0400
commit211596f407dbde1f755d0b309c7ecc707f116070 (patch)
tree0ee078c7b50fd7a286a1a730cec96887f467b18d /templates/admin/auth
parent9c67a193321a766097e6494484df5370010b512c (diff)
downloadgitea-211596f407dbde1f755d0b309c7ecc707f116070.tar.gz
gitea-211596f407dbde1f755d0b309c7ecc707f116070.zip
#1124 LDAP add and edit form are misleading
Diffstat (limited to 'templates/admin/auth')
-rw-r--r--templates/admin/auth/edit.tmpl14
-rw-r--r--templates/admin/auth/new.tmpl26
2 files changed, 26 insertions, 14 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 70bee6b43a..a178b71756 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -52,11 +52,11 @@
<input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attribute_username" name="attribute_username" value="{{.Source.LDAP.AttributeUsername}}" />
</div>
<div class="field">
- <label class="req" for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
+ <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attribute_name" name="attribute_name" value="{{.Source.LDAP.AttributeName}}" />
</div>
<div class="field">
- <label class="req" for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
+ <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attribute_surname" name="attribute_surname" value="{{.Source.LDAP.AttributeSurname}}" />
</div>
<div class="field">
@@ -75,7 +75,7 @@
{{else if eq $type 3}}
<div class="field">
<label class="req">{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
- <select name="smtpauth">
+ <select name="smtp_auth">
{{$auth := .Source.SMTP.Auth}}
{{range .SMTPAuths}}
<option value="{{.}}"
@@ -84,12 +84,12 @@
</select>
</div>
<div class="field">
- <label class="req" for="smtphost">{{.i18n.Tr "admin.auths.smtphost"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_SmtpHost}}ipt-error{{end}}" id="smtphost" name="smtphost" value="{{.Source.SMTP.Host}}" />
+ <label class="req" for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_SmtpHost}}ipt-error{{end}}" id="smtp_host" name="smtp_host" value="{{.Source.SMTP.Host}}" />
</div>
<div class="field">
- <label class="req" for="smtpport">{{.i18n.Tr "admin.auths.smtpport"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtpport" name="smtpport" value="{{.Source.SMTP.Port}}" />
+ <label class="req" for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtp_port" name="smtp_port" value="{{.Source.SMTP.Port}}" />
</div>
{{end}}
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index daae60e065..0d1f2ab417 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -44,8 +44,20 @@
<input class="ipt ipt-large ipt-radius {{if .Err_BaseDN}}ipt-error{{end}}" id="base_dn" name="base_dn" value="{{.base_dn}}" />
</div>
<div class="field">
- <label class="req" for="attributes">{{.i18n.Tr "admin.auths.attributes"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Attributes}}ipt-error{{end}}" id="attributes" name="attributes" value="{{.attributes}}" />
+ <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}}" />
+ </div>
+ <div class="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">
+ <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">
+ <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>
@@ -59,19 +71,19 @@
<div class="smtp hidden">
<div class="field">
<label class="req">{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
- <select name="smtpauth">
+ <select name="smtp_auth">
{{range .SMTPAuths}}
<option value="{{.}}">{{.}}</option>
{{end}}
</select>
</div>
<div class="field">
- <label class="req" for="smtphost">{{.i18n.Tr "admin.auths.smtphost"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_SmtpHost}}ipt-error{{end}}" id="smtphost" name="smtphost" value="{{.smtphost}}" />
+ <label class="req" for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_SmtpHost}}ipt-error{{end}}" id="smtp_host" name="smtp_host" value="{{.smtp_host}}" />
</div>
<div class="field">
- <label class="req" for="smtpport">{{.i18n.Tr "admin.auths.smtpport"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtpport" name="smtpport" value="{{.smtpport}}" />
+ <label class="req" for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtp_port" name="smtp_port" value="{{.smtp_port}}" />
</div>
</div>
<div class="field">