Commit e5f0b794 authored by Robin Sonnabend's avatar Robin Sonnabend

Useful error message for wrong topic modes

parent b0838e41
......@@ -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
......
......@@ -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 %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment