aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/templates/problem_edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'backend/admin/templates/problem_edit.html')
-rw-r--r--backend/admin/templates/problem_edit.html36
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 }}