EngineGP/template/megp/js/recovery.js
Sergei Solovev b59003e559 Reformat code
This update contains code reformatting to meet PHP standards.
2023-11-12 21:12:42 +03:00

28 lines
911 B
JavaScript

$('#recovery').ajaxForm({
dataType: 'json',
success: function (data) {
$.each(data, function (i, val) {
if (i == 'e') {
bootbox.dialog('<h3 class="red">Ошибка</h3>' + val,
[{
"label": "Продолжить",
}]
);
document.getElementById("captcha_img").src = home + 'user/section/recovery/captcha?' + Math.random();
$('#captcha').val('');
}
if (i == 's')
bootbox.dialog('<h3 class="green">Внимание</h3>' + val,
[{
"label": "Продолжить",
callback: function () {
location.href = "http://" + data['mail'];
}
}]
);
});
}
});