diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-06 00:32:03 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-06 00:32:03 +0900 |
| commit | e33bfff4db95586a3140b5e71a7d3dba2c72f694 (patch) | |
| tree | e469dee99215bb888c3dd3f30d0c3cfba0f669d0 /backend/admin/templates/problem_edit.html | |
| parent | 94d03dc712aff58e7594e7af38e0b6881238c778 (diff) | |
| download | iosdc-japan-2025-albatross-e33bfff4db95586a3140b5e71a7d3dba2c72f694.tar.gz iosdc-japan-2025-albatross-e33bfff4db95586a3140b5e71a7d3dba2c72f694.tar.zst iosdc-japan-2025-albatross-e33bfff4db95586a3140b5e71a7d3dba2c72f694.zip | |
feat(backend): add admin page for problems
Diffstat (limited to 'backend/admin/templates/problem_edit.html')
| -rw-r--r-- | backend/admin/templates/problem_edit.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/backend/admin/templates/problem_edit.html b/backend/admin/templates/problem_edit.html new file mode 100644 index 0000000..cc700f4 --- /dev/null +++ b/backend/admin/templates/problem_edit.html @@ -0,0 +1,36 @@ +{{ template "base.html" . }} + +{{ define "breadcrumb" }} +<a href="{{ .BasePath }}admin/dashboard">Dashboard</a> | <a href="{{ .BasePath }}admin/problems">Problems</a> +{{ end }} + +{{ define "content" }} +<form method="post"> + <div> + <label>Problem ID</label> + <input type="text" name="problem_id" value="{{ .Problem.ProblemID }}" readonly required> + </div> + <div> + <label>Title</label> + <input type="text" name="title" value="{{ .Problem.Title }}" required> + </div> + <div> + <label>Description</label> + <textarea name="description" rows="10" required>{{ .Problem.Description }}</textarea> + </div> + <div> + <label>Language</label> + <select name="language" required> + <option value="php"{{ if eq .Problem.Language "php" }} selected{{ end }}>PHP</option> + <option value="swift"{{ if eq .Problem.Language "swift" }} selected{{ end }}>Swift</option> + </select> + </div> + <div> + <label>Sample Code</label> + <textarea name="sample_code" rows="15" required>{{ .Problem.SampleCode }}</textarea> + </div> + <div> + <button type="submit">Save</button> + </div> +</form> +{{ end }} |
