* add captcha reloader
* update posted template
This commit is contained in:
parent
6cdcc4c3b9
commit
56b90bf5f7
@ -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();
|
||||
}
|
||||
});
|
@ -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
|
||||
|
@ -8,6 +8,7 @@
|
||||
<script type="text/javascript" src="{% static 'postform.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'banners.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'settings.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'captcha.js' %}"></script>
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<pre class="error"> failed to post: {{error}} </pre>
|
||||
{% else %}
|
||||
{% if msgid %}
|
||||
<pre class="posted"> posted as {{msgid}} </pre>
|
||||
<pre class="posted"> posted </pre>
|
||||
{% else %}
|
||||
<pre class="posted"> message was not posted </pre>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user