summaryrefslogtreecommitdiffstats
path: root/templates/admin/users
diff options
context:
space:
mode:
authorzhsso <zhssoge@gmail.com>2014-04-10 14:20:58 -0400
committerzhsso <zhssoge@gmail.com>2014-04-10 14:20:58 -0400
commita4cbe79567072befd96cf1b7eb319de1e2809ca3 (patch)
tree3dff34e53f34632532fd7a05e00e6f06b3e7fb82 /templates/admin/users
parentf3ed11d177d76bcb1850c6670c1516d25a66eb2c (diff)
downloadgitea-a4cbe79567072befd96cf1b7eb319de1e2809ca3.tar.gz
gitea-a4cbe79567072befd96cf1b7eb319de1e2809ca3.zip
fix
Diffstat (limited to 'templates/admin/users')
-rw-r--r--templates/admin/users/edit.tmpl84
-rw-r--r--templates/admin/users/new.tmpl55
2 files changed, 139 insertions, 0 deletions
diff --git a/templates/admin/users/edit.tmpl b/templates/admin/users/edit.tmpl
new file mode 100644
index 0000000000..5db2c7a95e
--- /dev/null
+++ b/templates/admin/users/edit.tmpl
@@ -0,0 +1,84 @@
+{{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">
+ Edit Account
+ </div>
+
+ <div class="panel-body">
+ <br/>
+ <form action="/admin/users/{{.User.Id}}" method="post" class="form-horizontal">
+ {{if .IsSuccess}}<p class="alert alert-success">Account profile has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
+ {{.CsrfTokenHtml}}
+ <input type="hidden" value="{{.User.Id}}" name="userId"/>
+ <div class="form-group">
+ <label class="col-md-3 control-label">Username: </label>
+ <label class="control-label">{{.User.Name}}</label>
+ </div>
+
+ <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Email<strong class="text-danger">*</strong></label>
+ <div class="col-md-7">
+ <input name="email" class="form-control" placeholder="Type account's e-mail address" value="{{.User.Email}}" required="required">
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-md-3 control-label">Website</label>
+ <div class="col-md-7">
+ <input name="website" class="form-control" placeholder="Type account's website URL" value="{{.User.Website}}">
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-md-3 control-label">Location</label>
+ <div class="col-md-7">
+ <input name="location" class="form-control" placeholder="Type account's current location" value="{{.User.Location}}">
+ </div>
+ </div>
+
+ <div class="form-group {{if .Err_Avatar}}has-error has-feedback{{end}}">
+ <label class="col-md-3 control-label">Gravatar Email<strong class="text-danger">*</strong></label>
+ <div class="col-md-7">
+ <input name="avatar" class="form-control" placeholder="Type account's Gravatar e-mail address" required="required" value="{{.User.AvatarEmail}}">
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="col-md-7 col-md-offset-3">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
+ <strong>This account has activated</strong>
+ </label>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="col-md-7 col-md-offset-3">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
+ <strong>This account has administor permisson</strong>
+ </label>
+ </div>
+ </div>
+ </div>
+ <hr/>
+ <div class="form-group">
+ <div class="col-md-offset-3 col-md-6">
+ <button type="submit" class="btn btn-lg btn-primary btn-block">Update account profile</button>
+ <a type="button" href="/admin/users/{{.User.Id}}/delete" class="btn btn-lg btn-danger btn-block">Delete this account</a>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/admin/users/new.tmpl b/templates/admin/users/new.tmpl
new file mode 100644
index 0000000000..7f441f32b3
--- /dev/null
+++ b/templates/admin/users/new.tmpl
@@ -0,0 +1,55 @@
+{{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}}
+ <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</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="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">
+ </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>
+ <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>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file