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