You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
4.3 KiB

10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div id="body" class="container" data-page="admin">
  4. {{template "admin/nav" .}}
  5. <div id="admin-container" class="col-md-9">
  6. <div class="panel panel-default">
  7. <div class="panel-heading">
  8. Edit Account
  9. </div>
  10. <div class="panel-body">
  11. <br/>
  12. <form action="/admin/users/{{.User.Id}}" method="post" class="form-horizontal">
  13. {{.CsrfTokenHtml}}
  14. {{template "base/alert" .}}
  15. <div class="form-group">
  16. <label class="col-md-3 control-label">Auth Source: </label>
  17. <div class="col-md-7">
  18. <select name="logintype" class="form-control">
  19. <option value="0-0"{{if eq 0 .User.LoginSource}} selected{{end}}>Local</option>
  20. {{$tp := .User.LoginSource}}
  21. {{range $key, $val := .LoginSources}}
  22. <option value="{{$val.Type}}-{{$val.Id}}"{{if eq $val.Id $tp}} selected{{end}}>{{$val.Name}}</option>
  23. {{end}}
  24. </select>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-md-3 control-label">Auth Login Name: </label>
  29. <div class="col-md-7">
  30. <input name="loginname" class="form-control" placeholder="Type auth login's username" value="{{.User.LoginName}}">
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-md-3 control-label">Username: </label>
  35. <label class="control-label">{{.User.Name}}</label>
  36. </div>
  37. <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
  38. <label class="col-md-3 control-label">Email<strong class="text-danger">*</strong></label>
  39. <div class="col-md-7">
  40. <input name="email" class="form-control" placeholder="Type account's e-mail address" value="{{.User.Email}}" required="required">
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label class="col-md-3 control-label">Website</label>
  45. <div class="col-md-7">
  46. <input name="website" class="form-control" placeholder="Type account's website URL" value="{{.User.Website}}">
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label class="col-md-3 control-label">Location</label>
  51. <div class="col-md-7">
  52. <input name="location" class="form-control" placeholder="Type account's current location" value="{{.User.Location}}">
  53. </div>
  54. </div>
  55. <div class="form-group {{if .Err_Avatar}}has-error has-feedback{{end}}">
  56. <label class="col-md-3 control-label">Gravatar Email<strong class="text-danger">*</strong></label>
  57. <div class="col-md-7">
  58. <input name="avatar" class="form-control" placeholder="Type account's Gravatar e-mail address" required="required" value="{{.User.AvatarEmail}}">
  59. </div>
  60. </div>
  61. <div class="form-group">
  62. <div class="col-md-7 col-md-offset-3">
  63. <div class="checkbox">
  64. <label>
  65. <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
  66. <strong>This account has activated</strong>
  67. </label>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="form-group">
  72. <div class="col-md-7 col-md-offset-3">
  73. <div class="checkbox">
  74. <label>
  75. <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
  76. <strong>This account has administor permisson</strong>
  77. </label>
  78. </div>
  79. </div>
  80. </div>
  81. <hr/>
  82. <div class="form-group">
  83. <div class="col-md-offset-3 col-md-6">
  84. <button type="submit" class="btn btn-lg btn-primary btn-block">Update account profile</button>
  85. <a type="button" href="/admin/users/{{.User.Id}}/delete" class="btn btn-lg btn-danger btn-block">Delete this account</a>
  86. </div>
  87. </div>
  88. </form>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. {{template "base/footer" .}}