jumpserver/apps/templates/captcha/field.html

12 lines
369 B
HTML
Raw Normal View History

2016-09-03 06:37:01 +00:00
{{image}}{{hidden_field}}{{text_field}}
<script>
function refresh_captcha() {
$.getJSON("{% url "captcha-refresh" %}",
function (result) {
$('.captcha').attr('src', result['image_url']);
$('#id_captcha_0').val(result['key'])
})
}
$('.captcha').click(refresh_captcha)
</script>