add topics

This commit is contained in:
2025-05-18 15:56:29 +03:00
parent 86b568d0f4
commit f5485702a8
11 changed files with 250 additions and 10 deletions

12
views/topics/edit.etlua Normal file
View File

@ -0,0 +1,12 @@
<h1>Editing topic <%= topic.name %></h1>
<form method="post">
<input type="text" name="name" id="name" value="<%= topic.name %>" placeholder="Topic name" required><br>
<textarea id="description" name="description" value="<%= topic.description %>" placeholder="Topic description"></textarea><br>
<input type="checkbox" id="is_locked" name="is_locked" value="<%= ntob(topic.is_locked) %>">
<label for="is_locked">Locked</label><br>
<input type="submit" value="Save changes">
</form>
<form method="get" action="<%= url_for("topic", {slug = topic.slug}) %>">
<input type="submit" value="Cancel">
</form>
<i>Note: to preserve history, you cannot change the topic URL.</i>