diff --git a/modules/admin.py b/modules/admin.py index 66c0a267b6dad29673ef36cc11f76ecd0e6ab5be..d752581719060bb98f9a6b701849344bf9d174c6 100644 --- a/modules/admin.py +++ b/modules/admin.py @@ -171,7 +171,8 @@ def topic_new(): if event_id is None: return redirect(url_for(".index")) form.event_id.data = event_id - return render_layout("admin_topic_new.html", form=form) + event = Event.query.filter_by(id=event_id).first() + return render_layout("admin_topic_new.html", form=form, event=event) @admin.route("/topic/delete") @login_required diff --git a/templates/admin_topic_new.html b/templates/admin_topic_new.html index 53ff713b7243dbb9825c17640b1b205823ea7347..4be05bd105e3aa8ea941f0f5dd2007451a33ae37 100644 --- a/templates/admin_topic_new.html +++ b/templates/admin_topic_new.html @@ -3,5 +3,5 @@ {% block title %}Add Topic - Administration{% endblock %} {% block content %} - {{ render_form(form, action_url=url_for(".topic_new", id=id), action_text="Add", title="Create Topic") }} + {{ render_form(form, action_url=url_for(".topic_new", id=id, event_id=event.id), action_text="Add", title="Create Topic") }} {% endblock %}