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.

78 lines
5.0 KiB

  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="admin-wrapper">
  4. <div id="setting-wrapper" class="main-wrapper">
  5. <div id="admin-setting" class="container clear">
  6. {{template "admin/nav" .}}
  7. <div class="grid-4-5 left">
  8. <div class="setting-content">
  9. {{template "ng/base/alert" .}}
  10. <div id="setting-content">
  11. <div class="panel panel-radius">
  12. <div class="panel-header">
  13. <strong>{{.i18n.Tr "admin.users.edit_account"}}</strong>
  14. </div>
  15. <form class="form form-align panel-body" id="user-profile-form" action="/admin/users/{{.User.Id}}" method="post" data-delete-url="/admin/users/{{.User.Id}}/delete">
  16. {{.CsrfTokenHtml}}
  17. <div class="field">
  18. <label class="req">{{.i18n.Tr "admin.users.auth_source"}}</label>
  19. <select id="login-type" name="logintype">
  20. <option value="0-0">{{.i18n.Tr "admin.users.local"}}</option>
  21. {{$tp := .User.LoginSource}}
  22. {{range $key, $val := .LoginSources}}
  23. <option value="{{$val.Type}}-{{$val.Id}}"{{if eq $val.Id $tp}} selected{{end}}>{{$val.Name}}</option>
  24. {{end}}
  25. </select>
  26. </div>
  27. <div class="field">
  28. <label for="loginname">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
  29. <input class="ipt ipt-large ipt-radius {{if .Err_LoginName}}ipt-error{{end}}" id="loginname" name="loginname" value="{{.User.LoginName}}" />
  30. </div>
  31. <div class="field">
  32. <label>{{.i18n.Tr "username"}}</label>
  33. <label>{{.User.Name}}</label>
  34. </div>
  35. <div class="field">
  36. <label class="req" for="email">{{.i18n.Tr "email"}}</label>
  37. <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.User.Email}}" required/>
  38. </div>
  39. <div class="field pwd">
  40. <label for="password">{{.i18n.Tr "password"}}</label>
  41. <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" />
  42. </div>
  43. <div class="field">
  44. <label for="website">{{.i18n.Tr "settings.website"}}</label>
  45. <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.User.Website}}" />
  46. </div>
  47. <div class="field">
  48. <label for="location">{{.i18n.Tr "settings.location"}}</label>
  49. <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.User.Location}}" />
  50. </div>
  51. <div class="field">
  52. <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
  53. <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.User.AvatarEmail}}" />
  54. </div>
  55. <div class="field">
  56. <label></label>
  57. <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
  58. <strong>{{.i18n.Tr "admin.users.is_activated"}}</strong>
  59. <br>
  60. <label></label>
  61. <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
  62. <strong>{{.i18n.Tr "admin.users.is_admin"}}</strong>
  63. </div>
  64. <div class="field">
  65. <label></label>
  66. <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.users.update_profile"}}</button>
  67. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  68. <button class="btn btn-large btn-red btn-radius" id="user-delete">{{.i18n.Tr "admin.users.delete_account"}}</button>
  69. </div>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. {{template "ng/base/footer" .}}