Skip to content

Commit

Permalink
Remove hidden comment object_pk field from HTML. Refs #1028
Browse files Browse the repository at this point in the history
- this field is not used when removing comments. Only comment_id
  is actually used!
- get_details_case_run.html was displaying the wrong value for
  object_pk: it was showing TC.pk instead of TE.pk
  • Loading branch information
atodorov committed Nov 24, 2019
1 parent 1ac2784 commit 8ce8ad2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion tcms/templates/case/get_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ <h4>{% trans "Comments" %}:</h4>
{% if review_mode and comment.user.pk == user.pk %}
<form action="{% url "comments-delete" %}" method="post" class="form_comment">
<input type="hidden" name="comment_id" value="{{ comment.pk }}" />
<input type="hidden" name="object_pk" value="{{ test_case.pk }}" />
<input class='commentdelete sprites' value='Delete Comment' type='submit' />
</form>
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion tcms/templates/case/get_details_case_run.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ <h4 class="borderB">Comments History ({{ comments_count }}):
{% if perms.comments.can_moderate and comment.user.pk == request.user.pk %}
<form action="{% url "comments-delete" %}" method="post" class="form_comment" style="display:inline;">
<input type="hidden" name="comment_id" value="{{ comment.pk }}" />
<input type="hidden" name="object_pk" value="{{ execution.case_id }}" />
<input class='commentdelete sprites' value='' type='submit' title="Remove Comment" />
</form>
{% endif %}
Expand Down

0 comments on commit 8ce8ad2

Please sign in to comment.