summaryrefslogtreecommitdiffstats
path: root/templates/admin/user/new.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/admin/user/new.tmpl')
-rw-r--r--templates/admin/user/new.tmpl140
1 files changed, 52 insertions, 88 deletions
diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl
index 4f4866c4b6..19126ee0c4 100644
--- a/templates/admin/user/new.tmpl
+++ b/templates/admin/user/new.tmpl
@@ -1,94 +1,58 @@
-{{template "base/head" .}}
-{{template "base/navbar" .}}
-<div id="body" class="container" data-page="admin">
- {{template "admin/nav" .}}
- <div id="admin-container" class="col-md-9">
- <div class="panel panel-default">
- <div class="panel-heading">
- New Account
- </div>
-
- <div class="panel-body">
- <br/>
- <form action="/admin/users/new" method="post" class="form-horizontal">
- {{.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" id="login-type">
- <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="auth-name hidden">
- <div class="form-group">
- <label class="col-md-3 control-label">Auth Login Name: </label>
- <div class="col-md-7">
- <input name="loginname" class="form-control" placeholder="Type auth login's username" value="{{.loginname}}">
- </div>
- </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">
- <input name="username" class="form-control" placeholder="Type account's username" value="{{.username}}" required="required">
- </div>
- </div>
-
- <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
- <label class="col-md-3 control-label">Email: </label>
- <div class="col-md-7">
- <input name="email" class="form-control" placeholder="Type account's e-mail address" value="{{.email}}" required="required" title="Email is not valid">
- </div>
- </div>
-
- <div class="pwd">
- <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
- <label class="col-md-3 control-label">Password: </label>
- <div class="col-md-7">
- <input name="passwd" type="password" class="form-control" placeholder="Type account's password" required="required" title="Password must contain at least 6 characters">
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="admin-wrapper">
+ <div id="setting-wrapper" class="main-wrapper">
+ <div id="admin-setting" class="container clear">
+ {{template "admin/nav" .}}
+ <div class="grid-4-5 left">
+ <div class="setting-content">
+ {{template "ng/base/alert" .}}
+ <div id="setting-content">
+ <div class="panel panel-radius">
+ <div class="panel-header">
+ <strong>{{.i18n.Tr "admin.users.new_account"}}</strong>
</div>
- </div>
-
- <div class="form-group {{if .Err_RetypePasswd}}has-error has-feedback{{end}}">
- <label class="col-md-3 control-label">Re-type: </label>
- <div class="col-md-7">
- <input name="retypepasswd" type="password" class="form-control" placeholder="Re-type account's password" required="required" title="Re-type Password must be same to Password">
- </div>
- </div>
- </div>
- <hr/>
- <div class="form-group">
- <div class="col-md-offset-3 col-md-7">
- <button type="submit" class="btn btn-lg btn-primary">Create new account</button>
+ <form class="form form-align panel-body" id="repo-setting-form" action="/admin/users/new" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="field">
+ <label class="req">{{.i18n.Tr "admin.users.auth_source"}}</label>
+ <select id="login-type" name="logintype">
+ <option value="0-0">{{.i18n.Tr "admin.users.local"}}</option>
+ {{range $key, $val := .LoginSources}}
+ <option value="{{$val.Type}}-{{$val.Id}}">{{$val.Name}}</option>
+ {{end}}
+ </select>
+ </div>
+ <div class="field auth-name hidden">
+ <label class="req" for="loginname">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_LoginName}}ipt-error{{end}}" id="loginname" name="loginname" value="{{.loginname}}" />
+ </div>
+ <div class="field">
+ <label class="req" for="username">{{.i18n.Tr "username"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.uname}}" required />
+ </div>
+ <div class="field">
+ <label class="req" for="email">{{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.email}}" required/>
+ </div>
+ <div class="field pwd">
+ <label class="req" for="password">{{.i18n.Tr "password"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" value="{{.password}}" required/>
+ </div>
+ <div class="field">
+ <label class="req" for="re-type">{{.i18n.Tr "re_type"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="re-type" name="retype" type="password" required/>
+ </div>
+ <div class="field">
+ <span class="form-label"></span>
+ <button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "admin.users.new_account"}}</button>
+ </div>
+ </form>
</div>
</div>
- </form>
+ </div>
</div>
</div>
-
- </div>
+ </div>
</div>
-<script>
- $(function(){
- $('#login-type').on("change",function(){
- var v = $(this).val();
- if(v.indexOf("0-")+1){
- $('.auth-name').toggleHide();
- $(".pwd").find("input").attr("required","required")
- .end().toggleShow();
- }else{
- $(".pwd").find("input").removeAttr("required")
- .end().toggleHide();
- $('.auth-name').toggleShow();
- }
- });
- });
-</script>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "ng/base/footer" .}} \ No newline at end of file