about summary refs log tree commit diff
path: root/templates/userProfile.html
blob: 05aa01ddbc280b31c901b5458709a5f68a8ac39d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{{ define "profile" }}

{{ template "head" . }}
<body>
  {{ template "nav" . }}

  <span id="profile"></span>
  <h1><a href="#profile">Profile</a></h1>

  {{ if .err }}
    ERROR: {{ .err }}!
    <a href="/user/{{ .user.ID }}/profile">Edit your userpage here</a>
    or 
    <a href="/user/{{ .target_user.ID }}">Visit the userpage of that user</a>
  {{ else }}
  You can edit your profile below:
  <br> <br>
  <form method="POST" action="/user/{{ .user.ID }}/profile">
    <table>

    <tr>
      <td><label for="username">Name:</label></td>
      <td><input type="text" id="username" name="username" value={{ .user.Name }}><br><br></td>
    </tr>

    <tr>
      <td><label for="password1">Password</label></td>
      <td><input type="password" id="password1" name="password1"><br></td>
    </tr>

    <tr>
      <td><label for="password2">Repeat Password</label></td>
      <td><input type="password2" id="password2" name="password2"><br></td>
    </tr>

    <tr>
      <td></td>
      <td><br><input type="submit" value="Submit"></td>
    </tr>

    </table>
  </form>
  {{ end }}
</div>
{{ template "footer" . }}
{{ end }}