edit.tmpl 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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="{{AppSubUrl}}/admin/users/{{.User.Id}}" method="post" data-delete-url="{{AppSubUrl}}/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 class="text-left">{{.User.Name}}</label>
  34. </div>
  35. <div class="field">
  36. <label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
  37. <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.User.FullName}}" />
  38. </div>
  39. <div class="field">
  40. <label class="req" for="email">{{.i18n.Tr "email"}}</label>
  41. <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.User.Email}}" required/>
  42. </div>
  43. <div class="field pwd">
  44. <label for="password">{{.i18n.Tr "password"}}</label>
  45. <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" />
  46. </div>
  47. <div class="field">
  48. <label for="website">{{.i18n.Tr "settings.website"}}</label>
  49. <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.User.Website}}" />
  50. </div>
  51. <div class="field">
  52. <label for="location">{{.i18n.Tr "settings.location"}}</label>
  53. <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.User.Location}}" />
  54. </div>
  55. <div class="field">
  56. <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
  57. <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.User.AvatarEmail}}" />
  58. </div>
  59. <div class="field">
  60. <label></label>
  61. <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
  62. <strong>{{.i18n.Tr "admin.users.is_activated"}}</strong>
  63. <br>
  64. <label></label>
  65. <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
  66. <strong>{{.i18n.Tr "admin.users.is_admin"}}</strong>
  67. <br>
  68. <label></label>
  69. <input type="checkbox" name="allow_git_hook" {{if .User.AllowGitHook}}checked{{end}}>
  70. <strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong>
  71. </div>
  72. <div class="field">
  73. <label></label>
  74. <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.users.update_profile"}}</button>
  75. &nbsp;&nbsp;&nbsp;&nbsp;
  76. <button class="btn btn-large btn-red btn-radius" id="delete-account-btn" href="#delete-account-modal">{{.i18n.Tr "admin.users.delete_account"}}</button>
  77. </div>
  78. <div class="white-popup-block mfp-hide" id="delete-account-modal">
  79. <h1 class="text-red">{{.i18n.Tr "settings.delete_account_title"}}</h1>
  80. <p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
  81. <br>
  82. <button class="btn btn-red btn-large btn-radius" id="delete-account-submit">{{.i18n.Tr "settings.continue"}}</button>
  83. <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
  84. </div>
  85. </form>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. {{template "ng/base/footer" .}}