aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/templates/game_new.html
blob: 3e3210a62dcd65d5be435b969c78e3b67e4e6fe2 (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
{{ template "base.html" . }}

{{ define "breadcrumb" }}
<a href="{{ .BasePath }}admin/dashboard">Dashboard</a> | <a href="{{ .BasePath }}admin/games">Games</a>
{{ end }}

{{ define "content" }}
<form method="post">
  <div>
    <label>Display Name</label>
    <input type="text" name="display_name" required>
  </div>
  <div>
    <label>Game Type</label>
    <select name="game_type" required>
      <option value="1v1">1v1</option>
      <option value="multiplayer">Multiplayer</option>
    </select>
  </div>
  <div>
    <label>Is Public</label>
    <input type="checkbox" name="is_public">
  </div>
  <div>
    <label>Duration Seconds</label>
    <input type="number" name="duration_seconds" value="900" required>
  </div>
  <div>
    <label>Problem</label>
    <select name="problem_id" required>
      {{ range .Problems }}
        <option value="{{ .ProblemID }}">{{ .Title }} (id={{ .ProblemID }})</option>
      {{ end }}
    </select>
  </div>
  <div>
    <button type="submit">Create</button>
  </div>
</form>
{{ end }}