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 / settings / get_edit_agent_role.php

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

354 lines 24.1 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;
7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;}
8
9 $agent_role = get_option('wpsc_agent_role');
10 $role_id = isset($_POST) && isset($_POST['role_id']) ? intval($_POST['role_id']) : 0;
11 if (!$role_id) {
12 exit;
13 }
14
15 $agent_role_item = $agent_role[$role_id];
16
17 ob_start();
18 ?>
19 <form id="wpsc_frm_agent_role" action="javascript:function(return false;);" method="post">
20
21 <div class="form-group">
22 <label style="font-size:16px;"><?php _e('Label','supportcandy');?></label>
23 <input id="wpsc_role_label" class="form-control" name="agentrole[label]" value="<?php echo esc_attr($agent_role_item['label'])?>" />
24 </div>
25
26 <label style="margin-bottom:20px; font-size:16px;"><?php _e('Ticket Permissions','supportcandy');?></label>
27 <div class="form-group row" style="margin-bottom:30px;">
28 <div class="col-sm-4">
29 <label><?php _e('View unassigned','supportcandy');?></label>
30 <p class="help-block"><?php _e('Unassigned ticket list visibility.','supportcandy');?></p>
31 <select class="form-control" name="agentrole[view_unassigned]">
32 <option <?php echo esc_attr($agent_role_item['view_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
33 <option <?php echo esc_attr($agent_role_item['view_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
34 </select>
35 </div>
36 <div class="col-sm-4">
37 <label><?php _e('View assigned me','supportcandy');?></label>
38 <p class="help-block"><?php _e('Ticket assigned to user himself. This will also enable private notes.','supportcandy');?></p>
39 <select class="form-control" name="agentrole[view_assigned_me]">
40 <option <?php echo esc_attr($agent_role_item['view_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
41 <option <?php echo esc_attr($agent_role_item['view_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
42 </select>
43 </div>
44 <div class="col-sm-4">
45 <label><?php _e('View assigned others','supportcandy');?></label>
46 <p class="help-block"><?php _e('Ticket assigned to all other agents. This will also enable private notes.','supportcandy');?></p>
47 <select class="form-control" name="agentrole[view_assigned_others]">
48 <option <?php echo esc_attr($agent_role_item['view_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
49 <option <?php echo esc_attr($agent_role_item['view_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
50 </select>
51 </div>
52 </div>
53
54 <div class="form-group row" style="margin-bottom:30px;">
55 <div class="col-sm-4">
56 <label><?php _e('Assign unassigned','supportcandy');?></label>
57 <p class="help-block"><?php _e('Unassigned ticket assign agent capability.','supportcandy');?></p>
58 <select class="form-control" name="agentrole[assign_unassigned]">
59 <option <?php echo esc_attr($agent_role_item['assign_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
60 <option <?php echo esc_attr($agent_role_item['assign_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
61 </select>
62 </div>
63 <div class="col-sm-4">
64 <label><?php _e('Assign assigned me','supportcandy');?></label>
65 <p class="help-block"><?php _e('Ticket assigned to user himself further assign capability.','supportcandy');?></p>
66 <select class="form-control" name="agentrole[assign_assigned_me]">
67 <option <?php echo esc_attr($agent_role_item['assign_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
68 <option <?php echo esc_attr($agent_role_item['assign_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
69 </select>
70 </div>
71 <div class="col-sm-4">
72 <label><?php _e('Assign assigned others','supportcandy');?></label>
73 <p class="help-block"><?php _e('Ticket assigned to all other agents further assign capability.','supportcandy');?></p>
74 <select class="form-control" name="agentrole[assign_assigned_others]">
75 <option <?php echo esc_attr($agent_role_item['assign_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
76 <option <?php echo esc_attr($agent_role_item['assign_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
77 </select>
78 </div>
79 </div>
80
81 <div class="form-group row" style="margin-bottom:30px;">
82 <div class="col-sm-4">
83 <label><?php _e('Reply unassigned','supportcandy');?></label>
84 <p class="help-block"><?php _e('Unassigned ticket reply capability.','supportcandy');?></p>
85 <select class="form-control" name="agentrole[reply_unassigned]">
86 <option <?php echo esc_attr($agent_role_item['reply_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
87 <option <?php echo esc_attr($agent_role_item['reply_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
88 </select>
89 </div>
90 <div class="col-sm-4">
91 <label><?php _e('Reply assigned me','supportcandy');?></label>
92 <p class="help-block"><?php _e('Ticket assigned to user himself reply capability.','supportcandy');?></p>
93 <select class="form-control" name="agentrole[reply_assigned_me]">
94 <option <?php echo esc_attr($agent_role_item['reply_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
95 <option <?php echo esc_attr($agent_role_item['reply_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
96 </select>
97 </div>
98 <div class="col-sm-4">
99 <label><?php _e('Reply assigned others','supportcandy');?></label>
100 <p class="help-block"><?php _e('Ticket assigned to all other agents reply capability.','supportcandy');?></p>
101 <select class="form-control" name="agentrole[reply_assigned_others]">
102 <option <?php echo esc_attr($agent_role_item['reply_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
103 <option <?php echo esc_attr($agent_role_item['reply_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
104 </select>
105 </div>
106 </div>
107
108 <div class="form-group row" style="margin-bottom:30px;">
109 <div class="col-sm-4">
110 <label><?php _e('Change status unassigned','supportcandy');?></label>
111 <p class="help-block"><?php _e('Unassigned ticket status change capability.','supportcandy');?></p>
112 <select class="form-control" name="agentrole[cng_tkt_sts_unassigned]">
113 <option <?php echo esc_attr($agent_role_item['cng_tkt_sts_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
114 <option <?php echo esc_attr($agent_role_item['cng_tkt_sts_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
115 </select>
116 </div>
117 <div class="col-sm-4">
118 <label><?php _e('Change status assigned me','supportcandy');?></label>
119 <p class="help-block"><?php _e('Ticket assigned to user himself change ticket status capability.','supportcandy');?></p>
120 <select class="form-control" name="agentrole[cng_tkt_sts_assigned_me]">
121 <option <?php echo esc_attr($agent_role_item['cng_tkt_sts_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
122 <option <?php echo esc_attr($agent_role_item['cng_tkt_sts_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
123 </select>
124 </div>
125 <div class="col-sm-4">
126 <label><?php _e('Change status assigned others','supportcandy');?></label>
127 <p class="help-block"><?php _e('Ticket assigned to all other agents change ticket status capability.','supportcandy');?></p>
128 <select class="form-control" name="agentrole[cng_tkt_sts_assigned_others]">
129 <option <?php echo esc_attr($agent_role_item['cng_tkt_sts_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
130 <option <?php echo esc_attr($agent_role_item['cng_tkt_sts_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
131 </select>
132 </div>
133 </div>
134
135 <div class="form-group row" style="margin-bottom:30px;">
136 <div class="col-sm-4">
137 <label><?php _e('Change ticket fields unassigned','supportcandy');?></label>
138 <p class="help-block"><?php _e('Unassigned change ticket fields capability.','supportcandy');?></p>
139 <select class="form-control" name="agentrole[cng_tkt_field_unassigned]">
140 <option <?php echo esc_attr($agent_role_item['cng_tkt_field_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
141 <option <?php echo esc_attr($agent_role_item['cng_tkt_field_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
142 </select>
143 </div>
144 <div class="col-sm-4">
145 <label><?php _e('Change ticket fields assigned me','supportcandy');?></label>
146 <p class="help-block"><?php _e('Ticket assigned to user himself change ticket fields capability.','supportcandy');?></p>
147 <select class="form-control" name="agentrole[cng_tkt_field_assigned_me]">
148 <option <?php echo esc_attr($agent_role_item['cng_tkt_field_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
149 <option <?php echo esc_attr($agent_role_item['cng_tkt_field_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
150 </select>
151 </div>
152 <div class="col-sm-4">
153 <label><?php _e('Change ticket fields assigned others','supportcandy');?></label>
154 <p class="help-block"><?php _e('Ticket assigned to all other agents change ticket fields capability.','supportcandy');?></p>
155 <select class="form-control" name="agentrole[cng_tkt_field_assigned_others]">
156 <option <?php echo esc_attr($agent_role_item['cng_tkt_field_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
157 <option <?php echo esc_attr($agent_role_item['cng_tkt_field_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
158 </select>
159 </div>
160 </div>
161
162 <div class="form-group row" style="margin-bottom:30px;">
163 <div class="col-sm-4">
164 <label><?php _e('Change agentonly fields unassigned','supportcandy');?></label>
165 <p class="help-block"><?php _e('Unassigned change agentonly fields capability.','supportcandy');?></p>
166 <select class="form-control" name="agentrole[cng_tkt_ao_unassigned]">
167 <option <?php echo esc_attr($agent_role_item['cng_tkt_ao_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
168 <option <?php echo esc_attr($agent_role_item['cng_tkt_ao_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
169 </select>
170 </div>
171 <div class="col-sm-4">
172 <label><?php _e('Change agentonly fields assigned me','supportcandy');?></label>
173 <p class="help-block"><?php _e('Ticket assigned to user himself change agentonly fields capability.','supportcandy');?></p>
174 <select class="form-control" name="agentrole[cng_tkt_ao_assigned_me]">
175 <option <?php echo esc_attr($agent_role_item['cng_tkt_ao_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
176 <option <?php echo esc_attr($agent_role_item['cng_tkt_ao_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
177 </select>
178 </div>
179 <div class="col-sm-4">
180 <label><?php _e('Change agentonly fields assigned others','supportcandy');?></label>
181 <p class="help-block"><?php _e('Ticket assigned to all other agents change agentonly fields capability.','supportcandy');?></p>
182 <select class="form-control" name="agentrole[cng_tkt_ao_assigned_others]">
183 <option <?php echo esc_attr($agent_role_item['cng_tkt_ao_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
184 <option <?php echo esc_attr($agent_role_item['cng_tkt_ao_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
185 </select>
186 </div>
187 </div>
188
189 <div class="form-group row" style="margin-bottom:30px;">
190 <div class="col-sm-4">
191 <label><?php _e('Change Raised By unassigned','supportcandy');?></label>
192 <p class="help-block"><?php _e('Unassigned ticket change raised by capability.','supportcandy');?></p>
193 <select class="form-control" name="agentrole[cng_tkt_rb_unassigned]">
194 <option <?php echo esc_attr($agent_role_item['cng_tkt_rb_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
195 <option <?php echo esc_attr($agent_role_item['cng_tkt_rb_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
196 </select>
197 </div>
198 <div class="col-sm-4">
199 <label><?php _e('Change Raised By assigned me','supportcandy');?></label>
200 <p class="help-block"><?php _e('Ticket assigned to user himself change Raised By capability.','supportcandy');?></p>
201 <select class="form-control" name="agentrole[cng_tkt_rb_assigned_me]">
202 <option <?php echo esc_attr($agent_role_item['cng_tkt_rb_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
203 <option <?php echo esc_attr($agent_role_item['cng_tkt_rb_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
204 </select>
205 </div>
206 <div class="col-sm-4">
207 <label><?php _e('Change Raised By assigned others','supportcandy');?></label>
208 <p class="help-block"><?php _e('Ticket assigned to all other agents change Raised By capability.','supportcandy');?></p>
209 <select class="form-control" name="agentrole[cng_tkt_rb_assigned_others]">
210 <option <?php echo esc_attr($agent_role_item['cng_tkt_rb_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
211 <option <?php echo esc_attr($agent_role_item['cng_tkt_rb_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
212 </select>
213 </div>
214 </div>
215
216 <div class="form-group row" style="margin-bottom:30px;">
217 <div class="col-sm-4">
218 <label><?php _e('Delete unassigned','supportcandy');?></label>
219 <p class="help-block"><?php _e('Delete unassigned ticket capability.','supportcandy');?></p>
220 <select class="form-control" name="agentrole[delete_unassigned]">
221 <option <?php echo esc_attr($agent_role_item['delete_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
222 <option <?php echo esc_attr($agent_role_item['delete_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
223 </select>
224 </div>
225 <div class="col-sm-4">
226 <label><?php _e('Delete assigned me','supportcandy');?></label>
227 <p class="help-block"><?php _e('Ticket assigned to user himself delete capability.','supportcandy');?></p>
228 <select class="form-control" name="agentrole[delete_assigned_me]">
229 <option <?php echo esc_attr($agent_role_item['delete_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
230 <option <?php echo esc_attr($agent_role_item['delete_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
231 </select>
232 </div>
233 <div class="col-sm-4">
234 <label><?php _e('Delete assigned others','supportcandy');?></label>
235 <p class="help-block"><?php _e('Ticket assigned to all other agents delete capability.','supportcandy');?></p>
236 <select class="form-control" name="agentrole[delete_assigned_others]">
237 <option <?php echo esc_attr($agent_role_item['delete_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
238 <option <?php echo esc_attr($agent_role_item['delete_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
239 </select>
240 </div>
241 </div>
242
243 <div class="form-group row" style="margin-bottom:30px;">
244 <div class="col-sm-4">
245 <label><?php _e('Private note unassigned','supportcandy');?></label>
246 <p class="help-block"><?php _e('Private note unassigned ticket capability.','supportcandy');?></p>
247 <select class="form-control" name="agentrole[view_unassigned_private_note]">
248 <option <?php echo esc_attr($agent_role_item['view_unassigned_private_note']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
249 <option <?php echo esc_attr($agent_role_item['view_unassigned_private_note']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
250 </select>
251 </div>
252
253 <div class="col-sm-4">
254 <label><?php _e('Private note assigned me','supportcandy');?></label>
255 <p class="help-block"><?php _e('Ticket assigned to user himself private note capability.','supportcandy');?></p>
256 <select class="form-control" name="agentrole[view_assigned_me_private_note]">
257 <option <?php echo esc_attr($agent_role_item['view_assigned_me_private_note']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
258 <option <?php echo esc_attr($agent_role_item['view_assigned_me_private_note']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
259 </select>
260 </div>
261
262 <div class="col-sm-4">
263 <label><?php _e('Private note assigned others','supportcandy');?></label>
264 <p class="help-block"><?php _e('Ticket assigned to all other agents private note capability.','supportcandy');?></p>
265 <select class="form-control" name="agentrole[view_assigned_others_private_note]">
266 <option <?php echo esc_attr($agent_role_item['view_assigned_others_private_note']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
267 <option <?php echo esc_attr($agent_role_item['view_assigned_others_private_note']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
268 </select>
269 </div>
270 </div>
271
272 <div class="form-group row" style="margin-bottom:30px;">
273
274 <div class="col-sm-4">
275 <label><?php _e('Edit/Delete unassigned threads','supportcandy');?></label>
276 <p class="help-block"><?php _e('Edit/Delete unassigned ticket threads capability.','supportcandy');?></p>
277 <select class="form-control" name="agentrole[edit_delete_unassigned]">
278 <option <?php echo esc_attr($agent_role_item['edit_delete_unassigned']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
279 <option <?php echo esc_attr($agent_role_item['edit_delete_unassigned']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
280 </select>
281 </div>
282
283 <div class="col-sm-4">
284 <label><?php _e('Edit/Delete assigned me threads','supportcandy');?></label>
285 <p class="help-block"><?php _e('Ticket assigned to user himself edit/delete threads capability.','supportcandy');?></p>
286 <select class="form-control" name="agentrole[edit_delete_assigned_me]">
287 <option <?php echo esc_attr($agent_role_item['edit_delete_assigned_me']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
288 <option <?php echo esc_attr($agent_role_item['edit_delete_assigned_me']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
289 </select>
290 </div>
291
292 <div class="col-sm-4">
293 <label><?php _e('Edit/Delete assigned others threads','supportcandy');?></label>
294 <p class="help-block"><?php _e('Ticket assigned to all other agents edit/delete threads capability.','supportcandy');?></p>
295 <select class="form-control" name="agentrole[edit_delete_assigned_others]">
296 <option <?php echo esc_attr($agent_role_item['edit_delete_assigned_others']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
297 <option <?php echo esc_attr($agent_role_item['edit_delete_assigned_others']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
298 </select>
299 </div>
300
301 </div>
302
303 <div class="form-group row" style="margin-bottom:30px;">
304 <div class="col-sm-4">
305 <label><?php _e('View log unassigned','supportcandy');?></label>
306 <p class="help-block"><?php _e('View log unassigned ticket capability.','supportcandy');?></p>
307 <select class="form-control" name="agentrole[view_unassigned_log]">
308 <option <?php echo esc_attr($agent_role_item['view_unassigned_log']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
309 <option <?php echo esc_attr($agent_role_item['view_unassigned_log']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
310 </select>
311 </div>
312
313 <div class="col-sm-4">
314 <label><?php _e('View log assigned me','supportcandy');?></label>
315 <p class="help-block"><?php _e('Ticket assigned to user himself view log capability.','supportcandy');?></p>
316 <select class="form-control" name="agentrole[view_assigned_me_log]">
317 <option <?php echo esc_attr($agent_role_item['view_assigned_me_log']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
318 <option <?php echo esc_attr($agent_role_item['view_assigned_me_log']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
319 </select>
320 </div>
321
322 <div class="col-sm-4">
323 <label><?php _e('View log assigned others','supportcandy');?></label>
324 <p class="help-block"><?php _e('Ticket assigned to all other agents view log capability.','supportcandy');?></p>
325 <select class="form-control" name="agentrole[view_assigned_others_log]">
326 <option <?php echo esc_attr($agent_role_item['view_assigned_others_log']) == '0' ? 'selected="selected"' : ''?> value="0"><?php _e('Disable','supportcandy');?></option>
327 <option <?php echo esc_attr($agent_role_item['view_assigned_others_log']) == '1' ? 'selected="selected"' : ''?> value="1"><?php _e('Enable','supportcandy');?></option>
328 </select>
329 </div>
330 </div>
331
332 <?php do_action('wpsc_edit_agent_role_item',$agent_role_item); ?>
333
334 <input type="hidden" name="action" value="wpsc_settings" />
335 <input type="hidden" name="setting_action" value="set_edit_agent_role" />
336 <input type="hidden" name="role_id" value="<?php echo esc_attr($role_id) ?>" />
337 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('set_edit_agent_role')?>">
338 </form>
339 <?php
340 $body = ob_get_clean();
341 ob_start();
342 ?>
343 <button type="button" class="btn wpsc_popup_close" onclick="wpsc_modal_close();"><?php _e('Close','supportcandy');?></button>
344 <button type="button" class="btn wpsc_popup_action" onclick="wpsc_set_edit_agent_role(<?php echo esc_attr($role_id)?>);"><?php _e('Submit','supportcandy');?></button>
345 <?php
346 $footer = ob_get_clean();
347
348 $output = array(
349 'body' => $body,
350 'footer' => $footer
351 );
352
353 wp_send_json($output);
354