Ticket #13344: 13344.diff

File 13344.diff, 5.3 KB (added by Erik Stein, 14 years ago)

Patch renaming the template variable to "post_comment_next". comment_tests ran successfully.

  • contrib/comments/views/moderation.py

     
    2828    # Render a form on GET
    2929    else:
    3030        return render_to_response('comments/flag.html',
    31             {'comment': comment, "next": next},
     31            {'comment': comment, "post_comment_next": next},
    3232            template.RequestContext(request)
    3333        )
    3434
     
    5555    # Render a form on GET
    5656    else:
    5757        return render_to_response('comments/delete.html',
    58             {'comment': comment, "next": next},
     58            {'comment': comment, "post_comment_next": next},
    5959            template.RequestContext(request)
    6060        )
    6161
     
    8282    # Render a form on GET
    8383    else:
    8484        return render_to_response('comments/approve.html',
    85             {'comment': comment, "next": next},
     85            {'comment': comment, "post_comment_next": next},
    8686            template.RequestContext(request)
    8787        )
    8888
  • contrib/comments/views/comments.py

     
    9696            template_list, {
    9797                "comment" : form.data.get("comment", ""),
    9898                "form" : form,
    99                 "next": next,
     99                "post_comment_next": next,
    100100            },
    101101            RequestContext(request, {})
    102102        )
  • contrib/comments/templates/comments/approve.html

     
    77  <h1>{% trans "Really make this comment public?" %}</h1>
    88  <blockquote>{{ comment|linebreaks }}</blockquote>
    99  <form action="." method="post">{% csrf_token %}
    10     {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
     10    {% if post_comment_next %}<input type="hidden" name="next" value="{{ post_comment_next }}" id="next" />{% endif %}
    1111    <p class="submit">
    1212      <input type="submit" name="submit" value="{% trans "Approve" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
    1313    </p>
  • contrib/comments/templates/comments/preview.html

     
    66{% block content %}
    77  {% load comments %}
    88  <form action="{% comment_form_target %}" method="post">{% csrf_token %}
    9     {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
     9    {% if post_comment_next %}<input type="hidden" name="next" value="{{ post_comment_next }}" />{% endif %}
    1010    {% if form.errors %}
    1111    <h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
    1212    {% else %}
  • contrib/comments/templates/comments/delete.html

     
    77<h1>{% trans "Really remove this comment?" %}</h1>
    88  <blockquote>{{ comment|linebreaks }}</blockquote>
    99  <form action="." method="post">{% csrf_token %}
    10     {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
     10    {% if post_comment_next %}<input type="hidden" name="next" value="{{ post_comment_next }}" id="next" />{% endif %}
    1111    <p class="submit">
    1212    <input type="submit" name="submit" value="{% trans "Remove" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
    1313    </p>
  • contrib/comments/templates/comments/form.html

     
    11{% load comments i18n %}
    22<form action="{% comment_form_target %}" method="post">{% csrf_token %}
    3   {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
     3  {% if post_comment_next %}<input type="hidden" name="next" value="{{ post_comment_next }}" />{% endif %}
    44  {% for field in form %}
    55    {% if field.is_hidden %}
    66      {{ field }}
  • contrib/comments/templates/comments/flag.html

     
    77<h1>{% trans "Really flag this comment?" %}</h1>
    88  <blockquote>{{ comment|linebreaks }}</blockquote>
    99  <form action="." method="post">{% csrf_token %}
    10     {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
     10    {% if post_comment_next %}<input type="hidden" name="next" value="{{ post_comment_next }}" id="next" />{% endif %}
    1111    <p class="submit">
    1212    <input type="submit" name="submit" value="{% trans "Flag" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
    1313    </p>
Back to Top