| @@ -1,45 +1,45 @@ | ||
| 1 | -function wppm_sign_in(){ | |
| 2 | - jQuery('#wppm_project_container').show(); | |
| 3 | - jQuery('#wppm_project_container').html(wppm_admin.loading_html); | |
| 4 | - var data = { | |
| 5 | - action: 'wppm_sign_in' | |
| 6 | - } | |
| 7 | - jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 8 | - jQuery('#wppm_project_container').html(response_str); | |
| 9 | - }) | |
| 10 | -} | |
| 11 | - | |
| 12 | -function wppm_task_sign_in(){ | |
| 13 | - jQuery('#wppm_task_container').show(); | |
| 14 | - jQuery('#wppm_task_container').html(wppm_admin.loading_html); | |
| 15 | - var data = { | |
| 16 | - action: 'wppm_sign_in' | |
| 17 | - } | |
| 18 | - jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 19 | - jQuery('#wppm_task_container').html(response_str); | |
| 20 | - }) | |
| 21 | -} | |
| 22 | - | |
| 23 | -function wppm_sign_in_frm(){ | |
| 24 | - var dataform = new FormData(jQuery('#frm_wppm_sign_in')[0]); | |
| 25 | - jQuery.ajax({ | |
| 26 | - url: wppm_admin.ajax_url, | |
| 27 | - type: 'POST', | |
| 28 | - data: dataform, | |
| 29 | - processData: false, | |
| 30 | - contentType: false | |
| 31 | - }) | |
| 32 | - .done(function (response) { | |
| 33 | - if (response.error == '1') { | |
| 34 | - jQuery('#wppm_message_login').html(response.message); | |
| 35 | - jQuery('#wppm_message_login').attr('class','bg-danger').slideDown('fast',function(){}); | |
| 36 | - jQuery('#frm_wppm_sign_in').find('input,button').attr('disabled',false); | |
| 37 | - jQuery('#frm_wppm_sign_in').find('#inputPassword').val(''); | |
| 38 | - setTimeout(function(){ jQuery('#wppm_message_login').slideUp('fast',function(){}); }, 3000); | |
| 39 | - } else { | |
| 40 | - jQuery('#wppm_message_login').html(response.message); | |
| 41 | - jQuery('#wppm_message_login').attr('class','bg-success').slideDown('fast',function(){}); | |
| 42 | - location.reload(); | |
| 43 | - } | |
| 44 | - }); | |
| 1 | +function wppm_sign_in(){ | |
| 2 | + jQuery('#wppm_project_container').show(); | |
| 3 | + jQuery('#wppm_project_container').html(wppm_admin.loading_html); | |
| 4 | + var data = { | |
| 5 | + action: 'wppm_sign_in' | |
| 6 | + } | |
| 7 | + jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 8 | + jQuery('#wppm_project_container').html(response_str); | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +function wppm_task_sign_in(){ | |
| 13 | + jQuery('#wppm_task_container').show(); | |
| 14 | + jQuery('#wppm_task_container').html(wppm_admin.loading_html); | |
| 15 | + var data = { | |
| 16 | + action: 'wppm_sign_in' | |
| 17 | + } | |
| 18 | + jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 19 | + jQuery('#wppm_task_container').html(response_str); | |
| 20 | + }) | |
| 21 | +} | |
| 22 | + | |
| 23 | +function wppm_sign_in_frm(){ | |
| 24 | + var dataform = new FormData(jQuery('#frm_wppm_sign_in')[0]); | |
| 25 | + jQuery.ajax({ | |
| 26 | + url: wppm_admin.ajax_url, | |
| 27 | + type: 'POST', | |
| 28 | + data: dataform, | |
| 29 | + processData: false, | |
| 30 | + contentType: false | |
| 31 | + }) | |
| 32 | + .done(function (response) { | |
| 33 | + if (response.error == '1') { | |
| 34 | + jQuery('#wppm_message_login').html(response.message); | |
| 35 | + jQuery('#wppm_message_login').attr('class','bg-danger').slideDown('fast',function(){}); | |
| 36 | + jQuery('#frm_wppm_sign_in').find('input,button').attr('disabled',false); | |
| 37 | + jQuery('#frm_wppm_sign_in').find('#inputPassword').val(''); | |
| 38 | + setTimeout(function(){ jQuery('#wppm_message_login').slideUp('fast',function(){}); }, 3000); | |
| 39 | + } else { | |
| 40 | + jQuery('#wppm_message_login').html(response.message); | |
| 41 | + jQuery('#wppm_message_login').attr('class','bg-success').slideDown('fast',function(){}); | |
| 42 | + location.reload(); | |
| 43 | + } | |
| 44 | + }); | |
| 45 | 45 | } |