Add hidden "next" fields to the comment forms.
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 31 Oct 2008 16:48:48 +0000 (17:48 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Fri, 31 Oct 2008 16:48:48 +0000 (17:48 +0100)
Previously, commenting would only work because the threadedcomments
application falls back to using HTTP referrer information, which is not
reliable.

templates/influences/influence_comments_block.html

index 390fce03cb66eab7e94434a0c8f7cc9d20599ace..430ed7135cb11bdb6a0b7bff29fbd64fcf702062 100644 (file)
@@ -29,6 +29,7 @@
                                        {{ comment.reply_form.as_table }}
                                        </table>
                                        <div>
+                    <input type="hidden" name="next" value="{{ request.path }}" />
                     <input type="submit" value="{% trans "Reply to this comment" %}" />
                     <input type="submit" name="preview" value="{% trans "Preview" %}" />
                     </div>
@@ -50,6 +51,7 @@
     {{ comment_form.as_table }}
     </table>
     <div>
+    <input type="hidden" name="next" value="{{ request.path }}" />
     <input type="submit" value="{% trans "Add comment" %}" />
     <input type="submit" name="preview" value="{% trans "Preview" %}" />
     </div>