PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 2.3.1
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v2.3.1
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
supportcandy / includes / admin / tickets / individual_ticket / get_bulk_change_status.php

get_bulk_change_status.php in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent 2.3.1, at includes/admin/tickets/individual_ticket/get_bulk_change_status.php

100 lines 4.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 global $current_user,$wpscfunction;
7 if (!($current_user->ID && $current_user->has_cap('wpsc_agent'))) {exit;}
8
9 $ticket_id = isset($_POST['ticket_id']) ? sanitize_text_field($_POST['ticket_id']) : '' ;
10
11 $wpsc_appearance_modal_window = get_option('wpsc_modal_window');
12 $wpsc_custom_status_localize = get_option('wpsc_custom_status_localize');
13 $wpsc_custom_category_localize = get_option('wpsc_custom_category_localize');
14 $wpsc_custom_priority_localize = get_option('wpsc_custom_priority_localize');
15 ob_start();
16 ?>
17 <form id="frm_ticket_change_status" method="post">
18
19 <div class="form-group">
20 <label for="wpsc_default_ticket_status"><?php _e('Ticket Status','supportcandy');?></label>
21 <select class="form-control" name="status" >
22 <option></option>
23 <?php
24 $statuses = get_terms([
25 'taxonomy' => 'wpsc_statuses',
26 'hide_empty' => false,
27 'orderby' => 'meta_value_num',
28 'order' => 'ASC',
29 'meta_query' => array('order_clause' => array('key' => 'wpsc_status_load_order')),
30 ]);
31 $wpsc_default_ticket_status = get_option('wpsc_default_ticket_status');
32 foreach ( $statuses as $status ) :
33 echo '<option value="'.esc_attr($status->term_id).'">'.esc_attr($wpsc_custom_status_localize['custom_status_'.$status->term_id]).'</option>';
34 endforeach;
35 ?>
36 </select>
37 </div>
38
39 <div class="form-group">
40 <label for="wpsc_default_ticket_category"><?php _e('Ticket Category','supportcandy');?></label>
41 <select class="form-control" name="category" >
42 <option value=""> </option>
43 <?php
44 $categories = get_terms([
45 'taxonomy' => 'wpsc_categories',
46 'hide_empty' => false,
47 'orderby' => 'meta_value_num',
48 'order' => 'ASC',
49 'meta_query' => array('order_clause' => array('key' => 'wpsc_category_load_order')),
50 ]);
51 $wpsc_default_ticket_category = get_option('wpsc_default_ticket_category');
52 foreach ( $categories as $category ) :
53 echo '<option value="'.esc_attr($category->term_id).'">'.esc_attr($wpsc_custom_category_localize['custom_category_'.$category->term_id]).'</option>';
54 endforeach;
55 ?>
56 </select>
57 </div>
58
59 <div class="form-group">
60 <label for="wpsc_default_ticket_priority"><?php _e('Ticket priority','supportcandy');?></label>
61 <select class="form-control" name="priority">
62 <option value=""> </option>
63 <?php
64 $priorities = get_terms([
65 'taxonomy' => 'wpsc_priorities',
66 'hide_empty' => false,
67 'orderby' => 'meta_value_num',
68 'order' => 'ASC',
69 'meta_query' => array('order_clause' => array('key' => 'wpsc_priority_load_order')),
70 ]);
71 $wpsc_default_ticket_priority = get_option('wpsc_default_ticket_priority');
72 foreach ( $priorities as $priority ) :
73 echo '<option value="'.esc_attr($priority->term_id).'">'.esc_attr($wpsc_custom_priority_localize['custom_priority_'.$priority->term_id]).'</option>';
74 endforeach;
75 ?>
76 </select>
77 </div>
78 <?php do_action('wpsc_after_bulk_change_ticket_status',$ticket_id);?>
79 <input type="hidden" name="action" value="wpsc_tickets" />
80 <input type="hidden" name="setting_action" value="set_bulk_change_status" />
81 <input type="hidden" name="ticket_id" value="<?php echo esc_attr($ticket_id) ?>" />
82 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('set_bulk_change_status')?>">
83 </form>
84 <?php
85 $body = ob_get_clean();
86
87 ob_start();
88 ?>
89 <button type="button" class="btn wpsc_popup_close" style="background-color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_close_button_bg_color'])?> !important;color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_close_button_text_color'])?> !important;" onclick="wpsc_modal_close();"><?php _e('Close','supportcandy');?></button>
90 <button type="button" class="btn wpsc_popup_action" style="background-color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_action_button_bg_color'])?> !important;color:<?php echo esc_attr($wpsc_appearance_modal_window['wpsc_action_button_text_color'])?> !important;" onclick="wpsc_set_bulk_change_status();"><?php _e('Save','supportcandy');?></button>
91 <?php
92 $footer = ob_get_clean();
93
94 $output = array(
95 'body' => $body,
96 'footer' => $footer
97 );
98
99 wp_send_json($output);
100