FormMaker/manage.html
2024-09-03 22:11:12 -06:00

45 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manage Questions</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="container">
<h1>Manage Questions</h1>
<!-- Dark mode toggle button -->
<button id="dark-mode-toggle">Toggle Dark Mode</button>
<h2>Add New Question</h2>
<form action="/manage/add" method="post">
<label for="question_text">Question Text:</label>
<input type="text" id="question_text" name="question_text" required><br><br>
<input type="submit" value="Add Question">
</form>
<h2>Existing Questions</h2>
<table>
<tr>
<th>Question Text</th>
<th>Actions</th>
</tr>
{{range .}}
<tr>
<td>{{.QuestionText}}</td>
<td><a href="/manage/remove?id={{.ID}}">Remove</a></td>
</tr>
{{else}}
<tr>
<td colspan="2">No questions found.</td>
</tr>
{{end}}
</table>
</div>
<script src="/static/theme.js"></script>
</body>
</html>