aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/templates
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-15 21:44:10 +0900
committernsfisis <nsfisis@gmail.com>2025-03-15 21:44:10 +0900
commit223891066ab3f727f2270e3674d93888405ca4d5 (patch)
tree8c0221b775e6983f4946b93f4456f2d24741412c /backend/admin/templates
parent074c7feb19efeb936025410ba6ec95ac01884f5e (diff)
downloadphperkaigi-2025-albatross-223891066ab3f727f2270e3674d93888405ca4d5.tar.gz
phperkaigi-2025-albatross-223891066ab3f727f2270e3674d93888405ca4d5.tar.zst
phperkaigi-2025-albatross-223891066ab3f727f2270e3674d93888405ca4d5.zip
feat(backen): allow admin to edit main players
Diffstat (limited to 'backend/admin/templates')
-rw-r--r--backend/admin/templates/game_edit.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/backend/admin/templates/game_edit.html b/backend/admin/templates/game_edit.html
index 5ff2ddc..53d647c 100644
--- a/backend/admin/templates/game_edit.html
+++ b/backend/admin/templates/game_edit.html
@@ -38,6 +38,24 @@
<input type="text" name="problem_id" value="{{ .Game.ProblemID }}">
</div>
<div>
+ <label>Main Player 1</label>
+ <select name="main_player_1">
+ <option value="0"{{ if eq $.Game.MainPlayer1 0 }} selected{{ end }}>none</option>
+ {{ range .Users }}
+ <option value="{{ .UserID }}"{{ if eq $.Game.MainPlayer1 .UserID }} selected{{ end }}>{{ .Username }} (uid={{ .UserID }})</option>
+ {{ end }}
+ </select>
+ </div>
+ <div>
+ <label>Main Player 2</label>
+ <select name="main_player_2">
+ <option value="0"{{ if eq $.Game.MainPlayer2 0 }} selected{{ end }}>none</option>
+ {{ range .Users }}
+ <option value="{{ .UserID }}"{{ if eq $.Game.MainPlayer2 .UserID }} selected{{ end }}>{{ .Username }} (uid={{ .UserID }})</option>
+ {{ end }}
+ </select>
+ </div>
+ <div>
<button type="submit">Save</button>
</div>
<div>