aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-05 05:32:47 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-05 05:32:47 -0400
commit3b7465f8171ddcc992498e14d8b608cad34c26da (patch)
treec78568eb08955ca968f793e9e7ae1d2f2e6f0415 /templates
parentd8136c9c3cf0f7d84510402f01cbe07a656a0587 (diff)
downloadgitea-3b7465f8171ddcc992498e14d8b608cad34c26da.tar.gz
gitea-3b7465f8171ddcc992498e14d8b608cad34c26da.zip
fix code
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/auths/edit.tmpl53
-rw-r--r--templates/admin/auths/new.tmpl51
-rw-r--r--templates/admin/users/edit.tmpl26
-rw-r--r--templates/admin/users/new.tmpl21
4 files changed, 77 insertions, 74 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>
diff --git a/templates/admin/users/edit.tmpl b/templates/admin/users/edit.tmpl
index 9c9c36a28c..1fb29234ed 100644
--- a/templates/admin/users/edit.tmpl
+++ b/templates/admin/users/edit.tmpl
@@ -13,19 +13,19 @@
<form action="/admin/users/{{.User.Id}}" method="post" class="form-horizontal">
{{.CsrfTokenHtml}}
{{template "base/alert" .}}
- <input type="hidden" value="{{.User.Id}}" name="userId"/>
- <div class="form-group">
- <label class="col-md-3 control-label">Auth Source: </label>
- <div class="col-md-7">
- <select name="logintype" class="form-control">
- <option value="0-0"{{if eq 0 .User.LoginSource}} selected{{end}}>Local</option>
- {{$tp := .User.LoginSource}}
- {{range $key, $val := .LoginSources}}
- <option value="{{$val.Type}}-{{$val.Id}}"{{if eq $val.Id $tp}} selected{{end}}>{{$val.Name}}</option>
- {{end}}
- </select>
- </div>
- </div>
+ <div class="form-group">
+ <label class="col-md-3 control-label">Auth Source: </label>
+ <div class="col-md-7">
+ <select name="logintype" class="form-control">
+ <option value="0-0"{{if eq 0 .User.LoginSource}} selected{{end}}>Local</option>
+ {{$tp := .User.LoginSource}}
+ {{range $key, $val := .LoginSources}}
+ <option value="{{$val.Type}}-{{$val.Id}}"{{if eq $val.Id $tp}} selected{{end}}>{{$val.Name}}</option>
+ {{end}}
+ </select>
+ </div>
+ </div>
+
<div class="form-group">
<label class="col-md-3 control-label">Username: </label>
<label class="control-label">{{.User.Name}}</label>
diff --git a/templates/admin/users/new.tmpl b/templates/admin/users/new.tmpl
index c19cd53c0a..88da16aa4e 100644
--- a/templates/admin/users/new.tmpl
+++ b/templates/admin/users/new.tmpl
@@ -14,16 +14,17 @@
{{.CsrfTokenHtml}}
{{template "base/alert" .}}
<div class="form-group">
- <label class="col-md-3 control-label">Auth Source: </label>
- <div class="col-md-7">
- <select name="logintype" class="form-control">
- <option value="0-0">Local</option>
- {{range $key, $val := .LoginSources}}
- <option value="{{$val.Type}}-{{$val.Id}}">{{$val.Name}}</option>
- {{end}}
- </select>
- </div>
- </div>
+ <label class="col-md-3 control-label">Auth Source: </label>
+ <div class="col-md-7">
+ <select name="logintype" class="form-control">
+ <option value="0-0">Local</option>
+ {{range $key, $val := .LoginSources}}
+ <option value="{{$val.Type}}-{{$val.Id}}">{{$val.Name}}</option>
+ {{end}}
+ </select>
+ </div>
+ </div>
+
<div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}">
<label class="col-md-3 control-label">Username: </label>
<div class="col-md-7">