Skip to content

Commit

Permalink
captcha js for bootstrap as well
Browse files Browse the repository at this point in the history
  • Loading branch information
claudehohl committed Sep 29, 2017
1 parent 0490766 commit 09fb700
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions htdocs/themes/bootstrap/js/stikked.js
Expand Up @@ -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;
}
Expand Down

0 comments on commit 09fb700

Please sign in to comment.