aboutsummaryrefslogtreecommitdiffstats
path: root/templates/news/add.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/news/add.html')
-rw-r--r--templates/news/add.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/news/add.html b/templates/news/add.html
index c2bc018..53fb682 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -1,9 +1,13 @@
{% extends 'layout.html' %}
{% block content %}
+{% if news %}
+<form action="{{ url_for('edit_news', news_id=news.id)}}" method="post">
+{% else %}
<form action="{{ url_for('add_news')}}" method="post">
- <input type=text size=80 name=title /><br/>
- <textarea name=content rows=20 cols=80></textarea>
+{% endif %}
+ <input type=text size=80 name=title value="{% if news %}{{news.title}}{% endif %}"/><br/>
+ <textarea name=content rows=20 cols=80>{% if news %}{{news.content}}{% endif %}</textarea>
<input type="submit" value="Submit" />
</form>
{% endblock %}