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.

83 lines
3.6 KiB

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. <input type="hidden" value="{{.User.Id}}" name="userId"/>
  16. <div class="form-group">
  17. <label class="col-md-3 control-label">Username: </label>
  18. <label class="control-label">{{.User.Name}}</label>
  19. </div>
  20. <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}">
  21. <label class="col-md-3 control-label">Email<strong class="text-danger">*</strong></label>
  22. <div class="col-md-7">
  23. <input name="email" class="form-control" placeholder="Type account's e-mail address" value="{{.User.Email}}" required="required">
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="col-md-3 control-label">Website</label>
  28. <div class="col-md-7">
  29. <input name="website" class="form-control" placeholder="Type account's website URL" value="{{.User.Website}}">
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <label class="col-md-3 control-label">Location</label>
  34. <div class="col-md-7">
  35. <input name="location" class="form-control" placeholder="Type account's current location" value="{{.User.Location}}">
  36. </div>
  37. </div>
  38. <div class="form-group {{if .Err_Avatar}}has-error has-feedback{{end}}">
  39. <label class="col-md-3 control-label">Gravatar Email<strong class="text-danger">*</strong></label>
  40. <div class="col-md-7">
  41. <input name="avatar" class="form-control" placeholder="Type account's Gravatar e-mail address" required="required" value="{{.User.AvatarEmail}}">
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <div class="col-md-7 col-md-offset-3">
  46. <div class="checkbox">
  47. <label>
  48. <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
  49. <strong>This account has activated</strong>
  50. </label>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="form-group">
  55. <div class="col-md-7 col-md-offset-3">
  56. <div class="checkbox">
  57. <label>
  58. <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
  59. <strong>This account has administor permisson</strong>
  60. </label>
  61. </div>
  62. </div>
  63. </div>
  64. <hr/>
  65. <div class="form-group">
  66. <div class="col-md-offset-3 col-md-6">
  67. <button type="submit" class="btn btn-lg btn-primary btn-block">Update account profile</button>
  68. <a type="button" href="/admin/users/{{.User.Id}}/delete" class="btn btn-lg btn-danger btn-block">Delete this account</a>
  69. </div>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. {{template "base/footer" .}}