diff --git a/quest/events.py b/quest/events.py
index 8ca51e1..65e2423 100644
--- a/quest/events.py
+++ b/quest/events.py
@@ -406,6 +406,21 @@ def write_in(socket, data):
socket.send('update_post', data)
+def new_page(socket, data):
+ """
+ Called when the QM creates a new page.
+ """
+ title = data.get('page_title')
+
+ quest = Quest.objects.get(id=socket.quest_id)
+ p = PageTitle(
+ quest=quest,
+ page_num=PageTitle.objects.filter(quest=quest).count() + 1,
+ title=title,
+ )
+ p.save()
+
+
events = {}
for obj in dir():
if type(locals()[obj]) == types.FunctionType:
diff --git a/quest/forms.py b/quest/forms.py
index e57d1f1..f4d287f 100644
--- a/quest/forms.py
+++ b/quest/forms.py
@@ -37,7 +37,7 @@ class PollForm(forms.Form):
continue
self.fields[key] = forms.CharField(max_length=200)
-class EditQuest(forms.Form):
+class EditQuestForm(forms.Form):
"""
Form for the /edit_quest page.
"""
diff --git a/quest/jinja2/quest/quest.html b/quest/jinja2/quest/quest.html
index bcf0e28..225feaf 100644
--- a/quest/jinja2/quest/quest.html
+++ b/quest/jinja2/quest/quest.html
@@ -46,13 +46,13 @@
{{ localtime(post.timestamp).strftime('%Y-%m-%d %H:%M') }}
{% if request.user == quest.owner %}
{% if post.post_type == "text" %}
-
Edit
+
Edit
{% elif post.post_type == "dice" %}
-
+
{% elif post.post_type == "poll" %}
-
+
{% endif %}
{% endif %}
@@ -75,7 +75,7 @@
{% for option in poll_options.filter(poll=post.poll).order_by("id") %}