Allow editing threads

This commit is contained in:
David Hoppenbrouwers
2022-10-08 13:34:09 +02:00
parent 6299a9e1fb
commit 47f92b2d83
4 changed files with 70 additions and 0 deletions

View File

@@ -22,6 +22,7 @@
<p><sub>
{{- author(name, ctime, mtime) -}}
{%- if author_id == session.get('user_id') -%}
<a href="{{ url_for('edit_thread', thread_id = thread_id) }}"> edit</a>
{%- endif -%}
{%- if author_id == session.get('user_id') -%}
<a href="{{ url_for('confirm_delete_thread', thread_id = thread_id) }}"> delete</a>

View File

@@ -0,0 +1,17 @@
{% extends 'base.html' %}
{% block content %}
<form method="post">
<table class=form>
<tr>
<td>Title</td>
<td><input type="text" name="title" value="{{ thread_title }}"></td>
</tr>
<tr>
<td>Text</td>
<td><textarea name="text">{{ text }}</textarea></td>
</tr>
</table>
<p><input type="submit" value="Post"></p>
</form>
{% endblock %}