invitea/static/templates/admin.tmpl

35 lines
866 B
Cheetah

<form method="POST">
<input type="hidden" name="action" value="create"/>
<p>
<label for="num_uses">Number of Uses (Leave at 0 for unlimited)</label>
<input type="number" name="num_uses" value="0" min="0"/>
</p>
<p>
<label for="expiration">Expiration (Leave blank for no expiration)</label>
<input 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>{{ .NumLeft }}/{{ .NumUses }}</td>
<td>{{ .Expiration }}</td>
<td>Delete</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}