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.

110 lines
4.6 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">Password</label>
  45. <div class="col-md-7">
  46. <input name="passwd" type="password" class="form-control" placeholder="Type account's new password or leave unfilled">
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label class="col-md-3 control-label">Website</label>
  51. <div class="col-md-7">
  52. <input name="website" class="form-control" placeholder="Type account's website URL" value="{{.User.Website}}">
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label class="col-md-3 control-label">Location</label>
  57. <div class="col-md-7">
  58. <input name="location" class="form-control" placeholder="Type account's current location" value="{{.User.Location}}">
  59. </div>
  60. </div>
  61. <div class="form-group {{if .Err_Avatar}}has-error has-feedback{{end}}">
  62. <label class="col-md-3 control-label">Gravatar Email<strong class="text-danger">*</strong></label>
  63. <div class="col-md-7">
  64. <input name="avatar" class="form-control" placeholder="Type account's Gravatar e-mail address" required="required" value="{{.User.AvatarEmail}}">
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <div class="col-md-7 col-md-offset-3">
  69. <div class="checkbox">
  70. <label>
  71. <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
  72. <strong>This account is activated</strong>
  73. </label>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="form-group">
  78. <div class="col-md-7 col-md-offset-3">
  79. <div class="checkbox">
  80. <label>
  81. <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
  82. <strong>This account has administrator permissions</strong>
  83. </label>
  84. </div>
  85. </div>
  86. </div>
  87. <hr/>
  88. <div class="form-group">
  89. <div class="col-md-offset-3 col-md-6">
  90. <button type="submit" class="btn btn-lg btn-primary btn-block">Update account profile</button>
  91. <a type="button" href="/admin/users/{{.User.Id}}/delete" class="btn btn-lg btn-danger btn-block">Delete this account</a>
  92. </div>
  93. </div>
  94. </form>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. {{template "base/footer" .}}