35 lines
879 B
Cheetah
35 lines
879 B
Cheetah
<form method="POST">
|
|
<input type="hidden" name="action" value="create"/>
|
|
<p>
|
|
<label for="uses">Number of Uses (Leave at 0 for unlimited)</label>
|
|
<input id="uses" type="number" name="uses" value="0" min="0"/>
|
|
</p>
|
|
<p>
|
|
<label for="expiration">Expiration (Leave blank for no expiration)</label>
|
|
<input id="expiration" type="date" name="expiration"/>
|
|
</p>
|
|
<button type="submit">Create Invite</button>
|
|
</form>
|
|
|
|
{{ if .invites }}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>Code</td>
|
|
<td>Number of Uses</td>
|
|
<td>Expiration</td>
|
|
<td></td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .invites }}
|
|
<tr>
|
|
<td>{{ .Code }}</td>
|
|
<td>{{ .Uses }}/{{ .Total }}</td>
|
|
<td>{{ .Expiration }}</td>
|
|
<td>Delete</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
{{ end }} |