Commit 88d5841b authored by Michal Čihař's avatar Michal Čihař

Check permissions before showing form

parent 53ef12b3
......@@ -196,12 +196,16 @@
<tr>
<th>{% trans "New comment" %}</th>
<td>
{% if perms.trans.add_comment %}
<form method="post" action="">
{% csrf_token %}
{{ comment_form.comment }}
<br />
<input class="button" type="submit" value="{% trans "Add" %}" />
</form>
{% else %}
{% trans "You are not allowed to add comments." %}
{% endif %}
</td>
</tr>
</table>
......@@ -223,12 +227,16 @@
<tr>
<th>{% trans "New comment" %}</th>
<td>
{% if perms.trans.add_comment %}
<form method="post" action="">
{% csrf_token %}
{{ comment_form.comment }}
<br />
<input class="button" type="submit" value="{% trans "Add" %}" />
</form>
{% else %}
{% trans "You are not allowed to add comments." %}
{% endif %}
</td>
</tr>
</table>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment