diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/static/captcha.js b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/captcha.js new file mode 100644 index 0000000..755c2c9 --- /dev/null +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/captcha.js @@ -0,0 +1,10 @@ +/** captcha.js */ + +onready(function(){ + var e = document.getElementById("captcha_img"); + if(!e) return; // no captcha + var original_url = e.src; + e.onclick = function() { + e.src = original_url + "?t="+new Date().getTime(); + } +}); diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/util.py b/contrib/frontends/django/nntpchan/nntpchan/frontend/util.py index a757540..bcd4382 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/frontend/util.py +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/util.py @@ -78,4 +78,6 @@ def createPost(newsgroup, ref, form, files): response = nntp.post(msg.as_bytes()) except Exception as e: return None, 'connection to backend failed, {}'.format(e) + if ref: + return ref, None return msg["Message-ID"], None diff --git a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html index 8b2353e..143d1cb 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html +++ b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html @@ -8,6 +8,7 @@ + {% block head %}{% endblock %} diff --git a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postresult.html b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postresult.html index afa316e..0148f58 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postresult.html +++ b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postresult.html @@ -9,7 +9,7 @@
 failed to post: {{error}} 
{% else %} {% if msgid %} -
 posted as {{msgid}} 
+
 posted 
{% else %}
 message was not posted 
{% endif %}