From 09fb70092320fb88f90fb5511f43d79161fd4878 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 29 Sep 2017 10:31:06 +0200 Subject: [PATCH] captcha js for bootstrap as well --- htdocs/themes/bootstrap/js/stikked.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/themes/bootstrap/js/stikked.js b/htdocs/themes/bootstrap/js/stikked.js index 8db956c..edec093 100644 --- a/htdocs/themes/bootstrap/js/stikked.js +++ b/htdocs/themes/bootstrap/js/stikked.js @@ -144,11 +144,13 @@ ST.crypto = function() { 'code': encrypted, 'lang': $('#lang').val(), 'expire': $('#expire').val(), + 'captcha': $('#captcha').val(), 'reply': $('input[name=reply]').val() }, function(redirect_url) { - if (redirect_url.indexOf('invalid') > -1) { - $('#create_encrypted').parent().html('

' + redirect_url + '#' + key + '

'); + if (redirect_url.indexOf('E_CAPTCHA') > -1) { + $('.container .message').remove(); + $('.container:eq(1)').prepend('
The captcha is incorrect.
'); } else { window.location.href = base_url + redirect_url + '#' + key; }