diff options
author | Claude <longneck@scratchbook.ch> | 2017-09-29 10:31:06 +0200 |
---|---|---|
committer | Claude <longneck@scratchbook.ch> | 2017-09-29 10:31:06 +0200 |
commit | 09fb70092320fb88f90fb5511f43d79161fd4878 (patch) | |
tree | d7e6fab39b47634b3be7d86a9d0f21c989af8b88 | |
parent | 04907662738ee62c7ae26689f5534d23cbb20572 (diff) | |
download | stikked-fit-09fb70092320fb88f90fb5511f43d79161fd4878.tar.gz stikked-fit-09fb70092320fb88f90fb5511f43d79161fd4878.tar.bz2 stikked-fit-09fb70092320fb88f90fb5511f43d79161fd4878.zip |
captcha js for bootstrap as well
-rw-r--r-- | htdocs/themes/bootstrap/js/stikked.js | 6 |
1 files 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('<p>' + redirect_url + '#' + key + '</p>'); + if (redirect_url.indexOf('E_CAPTCHA') > -1) { + $('.container .message').remove(); + $('.container:eq(1)').prepend('<div class="message error"><div class="container">The captcha is incorrect.</div></div>'); } else { window.location.href = base_url + redirect_url + '#' + key; } |