manage-accounts.html 791 B

1234567891011121314151617181920212223
  1. {{ template "header" }}
  2. <main>
  3. <h1>Manage Admin Accounts</h1>
  4. {{ with .User }}<p>Hello {{ .Username }}, your role is '{{ .Role }}'. Your email is {{ .Email }}.</p>{{ end }}
  5. <h3>Users</h3>
  6. <ul>{{ range .Users }}<li>{{.Username}}</li>{{ end }}</ul>
  7. <form action="/admin/manage-accounts/" method="post" id="add_user">
  8. <h3>Add user</h3>
  9. <p><input type="text" name="username" placeholder="username"><br>
  10. <input type="password" name="password" placeholder="password"><br>
  11. <input type="email" name="email" placeholder="email"><br>
  12. <select name="role">
  13. <option value="">role<option>
  14. {{ range $key, $val := .Roles }}<option value="{{$key}}">{{$key}} - {{$val}}</option>{{ end }}
  15. </select></p>
  16. <button type="submit">Submit</button>
  17. </form>
  18. </main>
  19. {{ template "footer" }}