← All changes
|
includes/admin/tasks/open_task/wppm_edit_task_status.php
+2
-1
5.0.5
→
6.0.6
View file →
| @@ -4,8 +4,9 @@ | ||
| 4 | 4 | } |
| 5 | 5 | global $wpdb,$wppmfunction,$current_user; |
| 6 | 6 | $task_id = isset($_POST['task_id']) ? absint(sanitize_text_field(wp_unslash($_POST['task_id']))) : '' ; |
| 7 | 7 | $proj_id = isset($_POST['proj_id']) ? absint(sanitize_text_field(wp_unslash($_POST['proj_id']))) : '' ; |
| 8 | +$current_project_id = isset($_POST['project_id']) ? absint(sanitize_text_field(wp_unslash($_POST['project_id']))) : '' ; | |
| 8 | 9 | if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_status',$task_id))) {exit;} |
| 9 | 10 | $task_data = $wppmfunction->get_task($task_id); |
| 10 | 11 | $statuses = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wppm_task_statuses"); |
| 11 | 12 | $status_id = $task_data['status']; |
| @@ -38,9 +39,9 @@ | ||
| 38 | 39 | |
| 39 | 40 | ob_start(); |
| 40 | 41 | ?> |
| 41 | 42 | <button type="button" class="btn <?php echo ($proj_id!="0")?'wppm_popup_close':'wppm_task_popup_close'?>" onclick="<?php echo ($proj_id!="0")?'wppm_modal_close();':'wppm_task_modal_close();'?>"><?php echo esc_html_e('Close','taskbuilder');?></button> |
| 42 | -<button type="button" class="btn <?php echo ($proj_id!="0")?'wppm_popup_action':'wppm_task_popup_action'?>" onclick="wppm_set_change_task_status(<?php echo (esc_js($task_id))?>,<?php echo esc_js($proj_id) ?> );"><?php echo esc_html_e('Save','taskbuilder');?></button> | |
| 43 | +<button type="button" class="btn <?php echo ($proj_id!="0")?'wppm_popup_action':'wppm_task_popup_action'?>" onclick="wppm_set_change_task_status(<?php echo (esc_js($task_id))?>,<?php echo esc_js($proj_id) ?>,<?php echo esc_js($current_project_id) ?>);"><?php echo esc_html_e('Save','taskbuilder');?></button> | |
| 43 | 44 | <?php |
| 44 | 45 | $footer = ob_get_clean(); |
| 45 | 46 | |
| 46 | 47 | $output = array( |