Add hidden "next" fields to the comment forms.
[matthijs/projects/xerxes.git] / templates / influences / influence_comments_block.html
index 19695917e4363b80a8b1011d22c7c1b7e21fbb09..430ed7135cb11bdb6a0b7bff29fbd64fcf702062 100644 (file)
                                        <table>
                                        {{ comment.reply_form.as_table }}
                                        </table>
-                                       <div><input type="submit" value="{% trans "Reply to this comment" %}" /></div>
+                                       <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>
                                </form>
                        </div>
         </div>
     <table>
     {{ comment_form.as_table }}
     </table>
-    <div><input type="submit" value="{% trans "Add comment" %}" /></div>
-    {# <input type="submit" name="preview" value="{% trans "Preview comment" %}" /></li> #}
+    <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>
 </form>
 </div>