Open GoogleCodeExporter opened 9 years ago
This would be nice but would have to rely on AJAX (we can't reload the whole
form). This could prove difficult because it'd have to integrate with whatever
javascript framework the site is using (if any)
Patches more than welcome, though.
Original comment by mbonetti
on 27 Mar 2011 at 8:08
As result I suggest this patch without javascript+ajax part. This patch allow
to get a new key by ajax. After it, of course, it's needed to refresh elements
on a form but I don't know how make it universally.
In my case i wrote (using jquery and jinja2 templates):
<script type="text/javascript">
$(document).ready(function() {
$('#captcha_refresh').click(function() {
$.get("{{ url('captcha-new-key') }}", function(data) {
var image_url = "{{ url('captcha-image', 0) }}"
image_url = image_url.replace('/0', '/' + data);
$('#id_captcha_image').attr('src', image_url);
$('#id_captcha_0').val(data);
$('#id_captcha_1').val('');
});
});
});
</script>
So, I suggest to add this patch. The rest of the work developer can implement
yourself.
Original comment by a.vostrjakov
on 28 Mar 2011 at 10:06
Attachments:
love you and thank you!
Original comment by Age...@gmail.com
on 4 Jul 2013 at 2:13
Original issue reported on code.google.com by
a.vostrjakov
on 27 Mar 2011 at 4:32