← All changes
|
includes/admin/settings/wppm_get_task_status_settings.php
+185
-185
5.0.0
→
6.0.6
View file →
| @@ -1,185 +1,185 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; // Exit if accessed directly | |
| 4 | -} | |
| 5 | -?> | |
| 6 | -<?php | |
| 7 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 8 | - exit; // Exit if accessed directly | |
| 9 | -} | |
| 10 | - | |
| 11 | -global $current_user, $wpdb, $wppmfunction; | |
| 12 | -if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { | |
| 13 | - exit; | |
| 14 | -} | |
| 15 | -$orderby_sql = esc_sql(sanitize_sql_orderby( "load_order ASC")); | |
| 16 | -$statuses = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_task_statuses ORDER BY $orderby_sql" ); | |
| 17 | -$status_arr = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}wppm_task_statuses" ); | |
| 18 | -$status_ids=array(); | |
| 19 | -if(!empty($status_arr)){ | |
| 20 | - foreach($status_arr as $key=>$val){ | |
| 21 | - $statuses_array= json_decode(json_encode($val)); | |
| 22 | - $status_ids[] = $statuses_array->id; | |
| 23 | - } | |
| 24 | - $status_ids = $wppmfunction->sanitize_array($status_ids); | |
| 25 | -} | |
| 26 | -$wppm_ap_settings = get_option("wppm-ap-settings"); | |
| 27 | -?> | |
| 28 | -<div id="wppm_task_statuses_container"> | |
| 29 | - <div class="wppm-help-container"> | |
| 30 | - <a href="https://taskbuilder.net/docs/task-statuses/" target="_blank"><?php echo esc_attr__( 'Click here', 'taskbuilder' )?></a> <?php echo esc_attr__( 'to see the documentation!', 'taskbuilder' )?> | |
| 31 | - </div> | |
| 32 | - <span class="wppm-title"> | |
| 33 | - <?php echo esc_html_e('Task Statuses','taskbuilder');?> | |
| 34 | - </span> | |
| 35 | - <span style="margin-left:10px;background-color:<?php echo esc_attr($wppm_ap_settings['add-new-button-bg-color'])?>;color:<?php echo esc_attr($wppm_ap_settings['add-new-button-text-color'])?>;" class="wppm_btn btn-primary wppm-add-new-btn" onclick="wppm_get_add_task_status();"><?php echo esc_html_e('+Add New','taskbuilder');?></span> | |
| 36 | - <div class="wppm_padding_space"></div> | |
| 37 | - <ul class="wppm-sortable"> | |
| 38 | - <?php | |
| 39 | - if(!empty($statuses)){ | |
| 40 | - foreach ($statuses as $status){ | |
| 41 | - $color=$status->color; | |
| 42 | - $background_color=$status->bg_color; | |
| 43 | - ?> | |
| 44 | - <li class="ui-state-default" data-id="<?php echo esc_attr($status->id)?>"> | |
| 45 | - <div class="wppm-flex-container"style="background-color:<?php echo esc_attr($background_color)?>;color:<?php echo esc_attr($color)?>;"> | |
| 46 | - <div class="wppm-sortable-handle"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/filter.svg'); ?>" alt="filter"></div> | |
| 47 | - <div class="wppm-sortable-label"><?php echo esc_html_e($status->name,'taskbuilder')?></div> | |
| 48 | - <div class="wppm-sortable-edit" onclick="wppm_get_edit_task_status(<?php echo esc_attr($status->id)?>);"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit1.svg'); ?>" alt="edit"></div> | |
| 49 | - <div class="wppm-sortable-delete" onclick="wppm_delete_task_status(<?php echo esc_attr($status->id)?>);"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/trash.svg'); ?>" alt="delete"></div> | |
| 50 | - </div> | |
| 51 | - </li> | |
| 52 | - | |
| 53 | - <?php } | |
| 54 | - } | |
| 55 | - ?> | |
| 56 | - </ul> | |
| 57 | - <input type="hidden" name="wppm_tstatus_order_ajax_nonce" id="wppm_tstatus_order_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_task_status_order' ) ); ?>"> | |
| 58 | - <input type="hidden" name="wppm_delete_tstatus_ajax_nonce" id="wppm_delete_tstatus_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_task_status' ) ); ?>"> | |
| 59 | -<div> | |
| 60 | -<style> | |
| 61 | - #wppm_task_statuses_container .wppm-add-new-btn:hover{ | |
| 62 | - background-color: <?php echo esc_attr($wppm_ap_settings['add-new-button-hover-color'])?>!important; | |
| 63 | - } | |
| 64 | -</style> | |
| 65 | -<script> | |
| 66 | - jQuery(function(){ | |
| 67 | - jQuery( ".wppm-sortable" ).sortable({ handle: '.wppm-sortable-handle' }); | |
| 68 | - jQuery( ".wppm-sortable" ).on("sortupdate",function(event,ui){ | |
| 69 | - var keys = jQuery(this).sortable( "toArray", {attribute: 'data-id'} ); | |
| 70 | - var status_order = <?php echo json_encode($status_ids); ?>; | |
| 71 | - var result = {}; | |
| 72 | - for (var i = 0; i < keys.length; i++){ | |
| 73 | - result[keys[i]] = status_order[i]; | |
| 74 | - } | |
| 75 | - var data = { | |
| 76 | - action: 'wppm_set_task_status_order', | |
| 77 | - load_orders : result, | |
| 78 | - _ajax_nonce : jQuery('#wppm_tstatus_order_ajax_nonce').val() | |
| 79 | - }; | |
| 80 | - jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 81 | - var response = JSON.parse(response_str); | |
| 82 | - if (response.sucess_status==1) { | |
| 83 | - jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); | |
| 84 | - } | |
| 85 | - jQuery('#wppm_alert_success').slideDown('fast',function(){}); | |
| 86 | - setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); | |
| 87 | - }); | |
| 88 | - }); | |
| 89 | - }); | |
| 90 | - | |
| 91 | - function wppm_set_add_task_status(){ | |
| 92 | - var status_name = jQuery('#wppm_task_status_name').val().trim(); | |
| 93 | - if (status_name.length == 0) { | |
| 94 | - jQuery('#wppm_task_status_name').val('').focus(); | |
| 95 | - return; | |
| 96 | - } | |
| 97 | - var status_color = jQuery('#wppm_task_status_color').val().trim(); | |
| 98 | - if (status_color.length == 0) { | |
| 99 | - status_color = '#ffffff'; | |
| 100 | - } | |
| 101 | - var status_bg_color = jQuery('#wppm_task_status_bg_color').val().trim(); | |
| 102 | - if (status_bg_color.length == 0) { | |
| 103 | - status_bg_color = '#1E90FF'; | |
| 104 | - } | |
| 105 | - jQuery('.wppm_popup_action').text('<?php _e('Please wait ...','taskbuilder')?>'); | |
| 106 | - jQuery('.wppm_popup_action, #wppm_popup_body input').attr("disabled", "disabled"); | |
| 107 | - var data = { | |
| 108 | - action: 'wppm_set_add_task_status', | |
| 109 | - status_name : status_name, | |
| 110 | - status_color: status_color, | |
| 111 | - status_bg_color: status_bg_color, | |
| 112 | - _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() | |
| 113 | - }; | |
| 114 | - jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 115 | - wppm_modal_close(); | |
| 116 | - var response = JSON.parse(response_str); | |
| 117 | - wppm_get_task_status_settings(); | |
| 118 | - if (response.sucess_status=='1') { | |
| 119 | - jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); | |
| 120 | - jQuery('#wppm_alert_success').slideDown('fast',function(){}); | |
| 121 | - setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); | |
| 122 | - wppm_get_task_status_settings(); | |
| 123 | - } else { | |
| 124 | - jQuery('#wppm_alert_error .wppm_alert_text').text(response.messege); | |
| 125 | - jQuery('#wppm_alert_error').slideDown('fast',function(){}); | |
| 126 | - setTimeout(function(){ jQuery('#wppm_alert_error').slideUp('fast',function(){}); }, 3000); | |
| 127 | - } | |
| 128 | - }) | |
| 129 | - } | |
| 130 | - | |
| 131 | - function wppm_get_edit_task_status(status_id){ | |
| 132 | - wppm_modal_open(wppm_admin.edit_status); | |
| 133 | - var data = { | |
| 134 | - action : 'wppm_get_edit_task_status', | |
| 135 | - status_id:status_id | |
| 136 | - }; | |
| 137 | - jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 138 | - var response = JSON.parse(response_str); | |
| 139 | - jQuery('#wppm_popup_body').html(response.body); | |
| 140 | - jQuery('#wppm_popup_footer').html(response.footer); | |
| 141 | - jQuery('#wppm_proj_status_name').focus(); | |
| 142 | - }) | |
| 143 | - } | |
| 144 | - | |
| 145 | - function wppm_set_edit_task_status(status_id){ | |
| 146 | - var status_name = jQuery('#wppm_edit_task_status_name').val().trim(); | |
| 147 | - if (status_name.length == 0) { | |
| 148 | - jQuery('#wppm_edit_task_status_name').val('').focus(); | |
| 149 | - return; | |
| 150 | - } | |
| 151 | - var status_color = jQuery('#wppm_edit_task_status_color').val().trim(); | |
| 152 | - if (status_color.length == 0) { | |
| 153 | - status_color = '#ffffff'; | |
| 154 | - } | |
| 155 | - var status_bg_color = jQuery('#wppm_edit_task_status_bg_color').val().trim(); | |
| 156 | - if (status_bg_color.length == 0) { | |
| 157 | - status_bg_color = '#1E90FF'; | |
| 158 | - } | |
| 159 | - jQuery('.wppm_popup_action').text('<?php _e('Please wait ...','taskbuilder')?>'); | |
| 160 | - jQuery('.wppm_popup_action, #wppm_popup_body input').attr("disabled", "disabled"); | |
| 161 | - var data = { | |
| 162 | - action : 'wppm_set_edit_task_status', | |
| 163 | - status_id:status_id, | |
| 164 | - status_name:status_name, | |
| 165 | - status_color: status_color, | |
| 166 | - status_bg_color: status_bg_color, | |
| 167 | - _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() | |
| 168 | - }; | |
| 169 | - jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 170 | - wppm_modal_close(); | |
| 171 | - var response = JSON.parse(response_str); | |
| 172 | - wppm_get_task_status_settings(); | |
| 173 | - if (response.sucess_status=='1') { | |
| 174 | - jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); | |
| 175 | - jQuery('#wppm_alert_success').slideDown('fast',function(){}); | |
| 176 | - setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); | |
| 177 | - wppm_get_task_status_settings(); | |
| 178 | - } else { | |
| 179 | - jQuery('#wppm_alert_error .wppm_alert_text').text(response.messege); | |
| 180 | - jQuery('#wppm_alert_error').slideDown('fast',function(){}); | |
| 181 | - setTimeout(function(){ jQuery('#wppm_alert_error').slideUp('fast',function(){}); }, 3000); | |
| 182 | - } | |
| 183 | - }); | |
| 184 | - } | |
| 185 | -</script> | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; // Exit if accessed directly | |
| 4 | +} | |
| 5 | +?> | |
| 6 | +<?php | |
| 7 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 8 | + exit; // Exit if accessed directly | |
| 9 | +} | |
| 10 | + | |
| 11 | +global $current_user, $wpdb, $wppmfunction; | |
| 12 | +if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { | |
| 13 | + exit; | |
| 14 | +} | |
| 15 | +$orderby_sql = (sanitize_sql_orderby( "load_order ASC")); | |
| 16 | +$statuses = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wppm_task_statuses ORDER BY $orderby_sql"); | |
| 17 | +$status_arr = $wpdb->get_results("SELECT id FROM {$wpdb->prefix}wppm_task_statuses"); | |
| 18 | +$status_ids=array(); | |
| 19 | +if(!empty($status_arr)){ | |
| 20 | + foreach($status_arr as $key=>$val){ | |
| 21 | + $statuses_array= json_decode(wp_json_encode($val)); | |
| 22 | + $status_ids[] = $statuses_array->id; | |
| 23 | + } | |
| 24 | + $status_ids = $wppmfunction->sanitize_array($status_ids); | |
| 25 | +} | |
| 26 | +$wppm_ap_settings = get_option("wppm-ap-settings"); | |
| 27 | +?> | |
| 28 | +<div id="wppm_task_statuses_container"> | |
| 29 | + <div class="wppm-help-container"> | |
| 30 | + <a href="https://taskbuilder.net/docs/task-statuses/" target="_blank"><?php echo esc_attr__( 'Click here', 'taskbuilder' )?></a> <?php echo esc_attr__( 'to see the documentation!', 'taskbuilder' )?> | |
| 31 | + </div> | |
| 32 | + <span class="wppm-title"> | |
| 33 | + <?php echo esc_html_e('Task Statuses','taskbuilder');?> | |
| 34 | + </span> | |
| 35 | + <span style="margin-left:10px;background-color:<?php echo esc_attr($wppm_ap_settings['add-new-button-bg-color'])?>;color:<?php echo esc_attr($wppm_ap_settings['add-new-button-text-color'])?>;" class="wppm_btn btn-primary wppm-add-new-btn" onclick="wppm_get_add_task_status();"><?php echo esc_html_e('+Add New','taskbuilder');?></span> | |
| 36 | + <div class="wppm_padding_space"></div> | |
| 37 | + <ul class="wppm-sortable"> | |
| 38 | + <?php | |
| 39 | + if(!empty($statuses)){ | |
| 40 | + foreach ($statuses as $status){ | |
| 41 | + $color=$status->color; | |
| 42 | + $background_color=$status->bg_color; | |
| 43 | + ?> | |
| 44 | + <li class="ui-state-default" data-id="<?php echo esc_attr($status->id)?>"> | |
| 45 | + <div class="wppm-flex-container"style="background-color:<?php echo esc_attr($background_color)?>;color:<?php echo esc_attr($color)?>;"> | |
| 46 | + <div class="wppm-sortable-handle"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/filter.svg'); ?>" alt="filter"></div> | |
| 47 | + <div class="wppm-sortable-label"><?php echo esc_html($status->name)?></div> | |
| 48 | + <div class="wppm-sortable-edit" onclick="wppm_get_edit_task_status(<?php echo esc_attr($status->id)?>);"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit1.svg'); ?>" alt="edit"></div> | |
| 49 | + <div class="wppm-sortable-delete" onclick="wppm_delete_task_status(<?php echo esc_attr($status->id)?>);"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/trash.svg'); ?>" alt="delete"></div> | |
| 50 | + </div> | |
| 51 | + </li> | |
| 52 | + | |
| 53 | + <?php } | |
| 54 | + } | |
| 55 | + ?> | |
| 56 | + </ul> | |
| 57 | + <input type="hidden" name="wppm_tstatus_order_ajax_nonce" id="wppm_tstatus_order_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_task_status_order' ) ); ?>"> | |
| 58 | + <input type="hidden" name="wppm_delete_tstatus_ajax_nonce" id="wppm_delete_tstatus_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_task_status' ) ); ?>"> | |
| 59 | +<div> | |
| 60 | +<style> | |
| 61 | + #wppm_task_statuses_container .wppm-add-new-btn:hover{ | |
| 62 | + background-color: <?php echo esc_attr($wppm_ap_settings['add-new-button-hover-color'])?>!important; | |
| 63 | + } | |
| 64 | +</style> | |
| 65 | +<script> | |
| 66 | + jQuery(function(){ | |
| 67 | + jQuery( ".wppm-sortable" ).sortable({ handle: '.wppm-sortable-handle' }); | |
| 68 | + jQuery( ".wppm-sortable" ).on("sortupdate",function(event,ui){ | |
| 69 | + var keys = jQuery(this).sortable( "toArray", {attribute: 'data-id'} ); | |
| 70 | + var status_order = <?php echo wp_json_encode($status_ids); ?>; | |
| 71 | + var result = {}; | |
| 72 | + for (var i = 0; i < keys.length; i++){ | |
| 73 | + result[keys[i]] = status_order[i]; | |
| 74 | + } | |
| 75 | + var data = { | |
| 76 | + action: 'wppm_set_task_status_order', | |
| 77 | + load_orders : result, | |
| 78 | + _ajax_nonce : jQuery('#wppm_tstatus_order_ajax_nonce').val() | |
| 79 | + }; | |
| 80 | + jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 81 | + var response = JSON.parse(response_str); | |
| 82 | + if (response.sucess_status==1) { | |
| 83 | + jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); | |
| 84 | + } | |
| 85 | + jQuery('#wppm_alert_success').slideDown('fast',function(){}); | |
| 86 | + setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); | |
| 87 | + }); | |
| 88 | + }); | |
| 89 | + }); | |
| 90 | + | |
| 91 | + function wppm_set_add_task_status(){ | |
| 92 | + var status_name = jQuery('#wppm_task_status_name').val().trim(); | |
| 93 | + if (status_name.length == 0) { | |
| 94 | + jQuery('#wppm_task_status_name').val('').focus(); | |
| 95 | + return; | |
| 96 | + } | |
| 97 | + var status_color = jQuery('#wppm_task_status_color').val().trim(); | |
| 98 | + if (status_color.length == 0) { | |
| 99 | + status_color = '#ffffff'; | |
| 100 | + } | |
| 101 | + var status_bg_color = jQuery('#wppm_task_status_bg_color').val().trim(); | |
| 102 | + if (status_bg_color.length == 0) { | |
| 103 | + status_bg_color = '#1E90FF'; | |
| 104 | + } | |
| 105 | + jQuery('.wppm_popup_action').text('<?php esc_js(__('Please wait ...','taskbuilder'))?>'); | |
| 106 | + jQuery('.wppm_popup_action, #wppm_popup_body input').attr("disabled", "disabled"); | |
| 107 | + var data = { | |
| 108 | + action: 'wppm_set_add_task_status', | |
| 109 | + status_name : status_name, | |
| 110 | + status_color: status_color, | |
| 111 | + status_bg_color: status_bg_color, | |
| 112 | + _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() | |
| 113 | + }; | |
| 114 | + jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 115 | + wppm_modal_close(); | |
| 116 | + var response = JSON.parse(response_str); | |
| 117 | + wppm_get_task_status_settings(); | |
| 118 | + if (response.sucess_status=='1') { | |
| 119 | + jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); | |
| 120 | + jQuery('#wppm_alert_success').slideDown('fast',function(){}); | |
| 121 | + setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); | |
| 122 | + wppm_get_task_status_settings(); | |
| 123 | + } else { | |
| 124 | + jQuery('#wppm_alert_error .wppm_alert_text').text(response.messege); | |
| 125 | + jQuery('#wppm_alert_error').slideDown('fast',function(){}); | |
| 126 | + setTimeout(function(){ jQuery('#wppm_alert_error').slideUp('fast',function(){}); }, 3000); | |
| 127 | + } | |
| 128 | + }) | |
| 129 | + } | |
| 130 | + | |
| 131 | + function wppm_get_edit_task_status(status_id){ | |
| 132 | + wppm_modal_open(wppm_admin.edit_status); | |
| 133 | + var data = { | |
| 134 | + action : 'wppm_get_edit_task_status', | |
| 135 | + status_id:status_id | |
| 136 | + }; | |
| 137 | + jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 138 | + var response = JSON.parse(response_str); | |
| 139 | + jQuery('#wppm_popup_body').html(response.body); | |
| 140 | + jQuery('#wppm_popup_footer').html(response.footer); | |
| 141 | + jQuery('#wppm_proj_status_name').focus(); | |
| 142 | + }) | |
| 143 | + } | |
| 144 | + | |
| 145 | + function wppm_set_edit_task_status(status_id){ | |
| 146 | + var status_name = jQuery('#wppm_edit_task_status_name').val().trim(); | |
| 147 | + if (status_name.length == 0) { | |
| 148 | + jQuery('#wppm_edit_task_status_name').val('').focus(); | |
| 149 | + return; | |
| 150 | + } | |
| 151 | + var status_color = jQuery('#wppm_edit_task_status_color').val().trim(); | |
| 152 | + if (status_color.length == 0) { | |
| 153 | + status_color = '#ffffff'; | |
| 154 | + } | |
| 155 | + var status_bg_color = jQuery('#wppm_edit_task_status_bg_color').val().trim(); | |
| 156 | + if (status_bg_color.length == 0) { | |
| 157 | + status_bg_color = '#1E90FF'; | |
| 158 | + } | |
| 159 | + jQuery('.wppm_popup_action').text('<?php esc_js(__('Please wait ...','taskbuilder'))?>'); | |
| 160 | + jQuery('.wppm_popup_action, #wppm_popup_body input').attr("disabled", "disabled"); | |
| 161 | + var data = { | |
| 162 | + action : 'wppm_set_edit_task_status', | |
| 163 | + status_id:status_id, | |
| 164 | + status_name:status_name, | |
| 165 | + status_color: status_color, | |
| 166 | + status_bg_color: status_bg_color, | |
| 167 | + _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() | |
| 168 | + }; | |
| 169 | + jQuery.post(wppm_admin.ajax_url, data, function(response_str) { | |
| 170 | + wppm_modal_close(); | |
| 171 | + var response = JSON.parse(response_str); | |
| 172 | + wppm_get_task_status_settings(); | |
| 173 | + if (response.sucess_status=='1') { | |
| 174 | + jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); | |
| 175 | + jQuery('#wppm_alert_success').slideDown('fast',function(){}); | |
| 176 | + setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); | |
| 177 | + wppm_get_task_status_settings(); | |
| 178 | + } else { | |
| 179 | + jQuery('#wppm_alert_error .wppm_alert_text').text(response.messege); | |
| 180 | + jQuery('#wppm_alert_error').slideDown('fast',function(){}); | |
| 181 | + setTimeout(function(){ jQuery('#wppm_alert_error').slideUp('fast',function(){}); }, 3000); | |
| 182 | + } | |
| 183 | + }); | |
| 184 | + } | |
| 185 | +</script> | |