-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.html
31 lines (30 loc) · 1.01 KB
/
admin.html
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
<html>
<body>
<form action="/admin/add" method="POST">
<fieldset>
<p><strong>Mail:</strong> <input type="text" name="mail" /></p>
<p>
<strong>Public Key:</strong> <small>(If you leave this empty, a key will be generated for you, but the private part won't be stored.)</small><br />
<textarea name="publickey"></textarea>
</p>
<input type="hidden" name="formid" value="{{.FormID}}" />
<input type="hidden" name="nonce" value="{{.Nonce}}" />
<input type="submit" value="Add" />
</fieldset>
</form>
{{$nonce := .Nonce}}
{{$formid := .FormID}}
{{range .APITokens}}
<h3>{{.Mail|html}}</h3>
<p><strong>Public key:</strong> <br /> <pre>{{.PublicKey}}</pre></p>
<p>
<form action="/admin/remove" method="POST">
<input type="hidden" name="mail" value="{{.Mail | html}}" />
<input type="hidden" name="nonce" value="{{$nonce}}" />
<input type="hidden" name="formid" value="{{$formid}}" />
<input type="submit" value="Revoke" />
</form>
</p>
{{end}}
</body>
</html>