diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-07-31 22:13:30 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-07-31 22:13:30 +0200 |
commit | d285d0525f86160a61067942346fb40f2bc5c797 (patch) | |
tree | fa7da0b2bf0de8604dafb8cf3a4aac68165ee56c /templates | |
parent | a1bba63fae68e7e6a680b14b674d9c47dfcf4862 (diff) | |
download | rocket-blog-d285d0525f86160a61067942346fb40f2bc5c797.tar.gz rocket-blog-d285d0525f86160a61067942346fb40f2bc5c797.tar.bz2 rocket-blog-d285d0525f86160a61067942346fb40f2bc5c797.zip |
Implemet editing users.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/edit_user.html | 30 | ||||
-rw-r--r-- | templates/users.html | 5 |
2 files changed, 34 insertions, 1 deletions
diff --git a/templates/edit_user.html b/templates/edit_user.html new file mode 100644 index 0000000..e1f379c --- /dev/null +++ b/templates/edit_user.html @@ -0,0 +1,30 @@ +<form id="edit_user" name="user" method="post" action="/users/{{ user.id }}/update"> + <div class="field"> + <label>Username:</label> + <input type="text" name="username" value="{{ user.username }}"> + </div> + + <div class="field"> + <label>Real Name:</label> + <input type="text" name="realname" value="{{ user.realname() }}"> + </div> + + <div class="field"> + <label>Email:</label> + <input type="text" name="email" value="{{ user.email() }}"> + </div> + + <div class="field"> + <label>Password:</label> + <input type="text" name="password" value=""> + </div> + + <div class="field"> + <label>Confirm password:</label> + <input type="text" name="password_confirm" value=""> + </div> + + <div class="actions"> + <input type="submit" value="Save changes"> + </div> +</form> diff --git a/templates/users.html b/templates/users.html index 4656e88..3ed4aa6 100644 --- a/templates/users.html +++ b/templates/users.html @@ -12,7 +12,10 @@ <td>{{ .username }}</td> <td>{{ .realname() }}</td> <td>{{ .email() }}</td> - <td><a href="/users/{{ .id }}/delete" id="delete_user">Delete</a></td> + <td> + <a href="/users/{{ .id }}/delete" id="delete_user">Delete</a> + <a href="/users/{{ .id }}/edit" id="edit_user_{{ .id }}">Edit</a> + </td> </tr> {{/ users }} </table> |