1234567891011121314151617181920212223 |
- {{ template "header" }}
- <main>
- <h1>Manage Admin Accounts</h1>
- {{ with .User }}<p>Hello {{ .Username }}, your role is '{{ .Role }}'. Your email is {{ .Email }}.</p>{{ end }}
- <h3>Users</h3>
- <ul>{{ range .Users }}<li>{{.Username}}</li>{{ end }}</ul>
- <form action="/admin/manage-accounts/" method="post" id="add_user">
- <h3>Add user</h3>
- <p><input type="text" name="username" placeholder="username"><br>
- <input type="password" name="password" placeholder="password"><br>
- <input type="email" name="email" placeholder="email"><br>
- <select name="role">
- <option value="">role<option>
- {{ range $key, $val := .Roles }}<option value="{{$key}}">{{$key}} - {{$val}}</option>{{ end }}
- </select></p>
- <button type="submit">Submit</button>
- </form>
- </main>
- {{ template "footer" }}
|