aboutsummaryrefslogtreecommitdiff
path: root/templates/blog/post.html
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-06-06 15:16:30 +0000
committerBobby <[email protected]>2024-06-06 15:16:30 +0000
commitf34a3c0fc64c8e4b8f10235edd84ff87fac4ef66 (patch)
tree063b9c7389ad435fd55fb53bfaad2d34e1e96866 /templates/blog/post.html
parente9096190c2833319c04a5de55b313330c4b51808 (diff)
downloadthatcomputerscientist-f34a3c0fc64c8e4b8f10235edd84ff87fac4ef66.tar.xz
thatcomputerscientist-f34a3c0fc64c8e4b8f10235edd84ff87fac4ef66.zip
AI Spam Check
Diffstat (limited to 'templates/blog/post.html')
-rw-r--r--templates/blog/post.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/blog/post.html b/templates/blog/post.html
index f0027ecc..b0b6194b 100644
--- a/templates/blog/post.html
+++ b/templates/blog/post.html
@@ -180,6 +180,13 @@ background: #ffffff0d;
{% if user.is_authenticated %}
<div id="new-comment" class="mtsbitem">
<h2>Leave a Comment</h2>
+ {% if messages %}
+ {% for message in messages %}
+ {% if 'spam' in message.tags %}
+ <p style="color: red;">Your comment was not allowed as it was marked as possible spam. If you think this is a mistake, please contact me at <a href="mailto:[email protected]">[email protected]</a>.</p>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
<form action="{% url 'blog:comment' post.slug %}" method="POST">
{% csrf_token %}
<textarea required name="comment" id="comment" cols="88" rows="10" style="width: 710px; display: block; margin-bottom: 15px;" placeholder="Your comment here..."></textarea>
@@ -362,13 +369,6 @@ background: #ffffff0d;
<script type="text/javascript">
var onImage = "{% static 'images/site/on.png' %}";
var offImage = "{% static 'images/site/off.png' %}";
- {% if messages %}
- {% for message in messages %}
- {% if 'spam' in message.tags %}
- alert('Your comment was marked as spam. If you think this is a mistake, please contact me.');
- {% endif %}
- {% endfor %}
- {% endif %}
{% if request.COOKIES.anonymous_name and request.COOKIES.anonymous_email and request.COOKIES.anonymous_token %}
$('#ancmClick').toggle();
$('#anonymous-comment-form').toggle();