captcha js for bootstrap as well

This commit is contained in:
Claude 2017-09-29 10:31:06 +02:00
parent 0490766273
commit 09fb700923

View File

@ -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;
}