diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-05 05:32:47 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-05 05:32:47 -0400 |
commit | 3b7465f8171ddcc992498e14d8b608cad34c26da (patch) | |
tree | c78568eb08955ca968f793e9e7ae1d2f2e6f0415 /templates/admin/auths | |
parent | d8136c9c3cf0f7d84510402f01cbe07a656a0587 (diff) | |
download | gitea-3b7465f8171ddcc992498e14d8b608cad34c26da.tar.gz gitea-3b7465f8171ddcc992498e14d8b608cad34c26da.zip |
fix code
Diffstat (limited to 'templates/admin/auths')
-rw-r--r-- | templates/admin/auths/edit.tmpl | 53 | ||||
-rw-r--r-- | templates/admin/auths/new.tmpl | 51 |
2 files changed, 53 insertions, 51 deletions
diff --git a/templates/admin/auths/edit.tmpl b/templates/admin/auths/edit.tmpl index 1a2548fbeb..e040ea8f77 100644 --- a/templates/admin/auths/edit.tmpl +++ b/templates/admin/auths/edit.tmpl @@ -15,69 +15,70 @@ {{template "base/alert" .}} <input type="hidden" value="{{.Source.Id}}" name="id"/> <div class="form-group"> - <label class="col-md-3 control-label">Auth Type: </label> - <div class="col-md-7"> - <select class="form-control"> - {{$type := .Source.Type}} - {{range $key, $val := .LoginTypes}} - <option value="{{$key}}" {{if eq $key $type}}selected{{end}}>{{$val}}</option> - {{end}} -</select> - </div> - </div> - <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}"> + <label class="col-md-3 control-label">Auth Type: </label> + <div class="col-md-7"> + <select class="form-control"> + {{$type := .Source.Type}} + {{range $key, $val := .LoginTypes}} + <option value="{{$key}}" {{if eq $key $type}}selected{{end}}>{{$val}}</option> + {{end}} + </select> + </div> + </div> + + <div class="form-group {{if .Err_AuthName}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Name: </label> <div class="col-md-7"> - <input name="name" class="form-control" placeholder="Type account's username" value="{{.Source.Name}}" required="required"> + <input name="name" class="form-control" placeholder="Type authentication's name" value="{{.Source.Name}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Domain}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Domain: </label> <div class="col-md-7"> - <input name="domain" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.Name}}" required="required" title="Email is not valid"> + <input name="domain" class="form-control" placeholder="Type domain name" value="{{.Source.LDAP.Name}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Host}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Host: </label> <div class="col-md-7"> - <input name="host" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.Host}}" required="required" title="Email is not valid"> + <input name="host" class="form-control" placeholder="Type host address" value="{{.Source.LDAP.Host}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Port}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Port: </label> <div class="col-md-7"> - <input name="port" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.Port}}" required="required" title="Email is not valid"> + <input name="port" class="form-control" placeholder="Type port number" value="{{.Source.LDAP.Port}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_BaseDN}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Base DN: </label> <div class="col-md-7"> - <input name="base_dn" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.BaseDN}}" required="required" title="Email is not valid"> + <input name="base_dn" class="form-control" placeholder="Type base DN" value="{{.Source.LDAP.BaseDN}}" required="required"> </div> </div> -<div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Attributes}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Search Attributes: </label> <div class="col-md-7"> - <input name="attributes" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.Attributes}}" required="required" title="Email is not valid"> + <input name="attributes" class="form-control" placeholder="Type search attributes" value="{{.Source.LDAP.Attributes}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Filter}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Search Filter: </label> <div class="col-md-7"> - <input name="filter" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.Filter}}" required="required" title="Email is not valid"> + <input name="filter" class="form-control" placeholder="Type search filter" value="{{.Source.LDAP.Filter}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_MsAdSA}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Ms Ad SA: </label> <div class="col-md-7"> - <input name="ms_ad_sa" class="form-control" placeholder="Type account's e-mail address" value="{{.Source.LDAP.MsAdSAFormat}}" required="required" title="Email is not valid"> + <input name="ms_ad_sa" class="form-control" placeholder="Type Ms Ad SA" value="{{.Source.LDAP.MsAdSAFormat}}" required="required"> </div> </div> diff --git a/templates/admin/auths/new.tmpl b/templates/admin/auths/new.tmpl index a5da93bd2a..1ed23569e4 100644 --- a/templates/admin/auths/new.tmpl +++ b/templates/admin/auths/new.tmpl @@ -14,68 +14,69 @@ {{.CsrfTokenHtml}} {{template "base/alert" .}} <div class="form-group"> - <label class="col-md-3 control-label">Auth Type: </label> - <div class="col-md-7"> - <select class="form-control"> - {{range $key, $val := .LoginTypes}} - <option value="{{$key}}">{{$val}}</option> - {{end}} - </select> - </div> - </div> - <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}"> + <label class="col-md-3 control-label">Auth Type: </label> + <div class="col-md-7"> + <select class="form-control"> + {{range $key, $val := .LoginTypes}} + <option value="{{$key}}">{{$val}}</option> + {{end}} + </select> + </div> + </div> + + <div class="form-group {{if .Err_AuthName}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Name: </label> <div class="col-md-7"> - <input name="name" class="form-control" placeholder="Authentication's name" required="required"> + <input name="name" class="form-control" placeholder="Type authentication's name" value="{{.name}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Domain}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Domain: </label> <div class="col-md-7"> - <input name="domain" class="form-control" placeholder="Domain name" value="{{.domain}}" required="required" title="Email is not valid"> + <input name="domain" class="form-control" placeholder="Type domain name" value="{{.domain}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Host}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Host: </label> <div class="col-md-7"> - <input name="host" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid"> + <input name="host" class="form-control" placeholder="Type host address" value="{{.host}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Port}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Port: </label> <div class="col-md-7"> - <input name="port" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid"> + <input name="port" class="form-control" placeholder="Type port number" value="{{.port}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_BaseDN}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Base DN: </label> <div class="col-md-7"> - <input name="base_dn" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid"> + <input name="base_dn" class="form-control" placeholder="Type base DN" value="{{.base_dn}}" required="required"> </div> </div> -<div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Attributes}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Search Attributes: </label> <div class="col-md-7"> - <input name="attributes" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid"> + <input name="attributes" class="form-control" placeholder="Type search attributes" value="{{.attributes}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_Filter}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Search Filter: </label> <div class="col-md-7"> - <input name="filter" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid"> + <input name="filter" class="form-control" placeholder="Type search filter" value="{{.filter}}" required="required"> </div> </div> - <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <div class="form-group {{if .Err_MsAdSA}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Ms Ad SA: </label> <div class="col-md-7"> - <input name="ms_ad_sa" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid"> + <input name="ms_ad_sa" class="form-control" placeholder="Type Ms Ad SA" value="{{.ms_ad_sa}}" required="required"> </div> </div> |