Nice to see you again
WELCOME BACK
Sign in to access your account, manage your downloads, and explore all the features available to you.
function wpdmTogglePwd() {
var pwd = document.getElementById('password');
var eye = document.getElementById('wpdm-eye');
var eyeOff = document.getElementById('wpdm-eye-off');
if (pwd.type === 'password') {
pwd.type = 'text';
eye.style.display = 'none';
eyeOff.style.display = 'block';
} else {
pwd.type = 'password';
eye.style.display = 'block';
eyeOff.style.display = 'none';
}
}
jQuery(function ($) {
var $btn = $('#loginform-submit');
var btnHtml = $btn.html();
$('#loginform').submit(function () {
$btn.html('
Signing in...').attr('disabled', 'disabled');
$(this).ajaxSubmit({
error: function(error) {
if(typeof error.responseJSON !== 'undefined') {
showErr(error.responseJSON.messages || error.responseJSON.message);
$btn.html(btnHtml).removeAttr('disabled');
} else {
setTimeout(function () {
location.href = "/purchases/";
}, 1000);
}
},
success: async function (res) {
if (!res.success) {
showErr(res.message);
$btn.html(btnHtml).removeAttr('disabled');
} else {
let proceed = await WPDM.doAction("wpdm_user_login", res);
$btn.html('
' + res.message + '');
setTimeout(function () {
location.href = "/purchases/";
}, 1000);
}
}
});
return false;
});
function showErr(msg) {
$('#loginform .wpdm-auth-alert.error').remove();
var html = '
' +
'' +
'' + msg + '
';
$('#loginform').prepend(html);
}
$('body').on('click', '.wpdm-auth-alert.error', function(){
$(this).slideUp(150, function() { $(this).remove(); });
});
});