PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 5.0.5
Taskbuilder – Project Management & Task Management Tool With Kanban Board v5.0.5
6.0.5 6.0.2 6.0.3 6.0.4 6.0.1 6.0.0 5.0.8 5.0.9 4.0.9 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 All 57 releases
taskbuilder / includes / admin / tasks / open_task / wppm_clone_task.php

wppm_clone_task.php in Taskbuilder – Project Management & Task Management Tool With Kanban Board 5.0.5, at includes/admin/tasks/open_task/wppm_clone_task.php

44 lines 1.7 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 global $current_user,$wppmfunction;
6 $task_id = isset($_POST['id']) ? absint(sanitize_text_field(wp_unslash($_POST['id']))) : '' ;
7 $proj_id = isset($_POST['proj_id']) ? absint(sanitize_text_field(wp_unslash($_POST['proj_id']))) : '';
8
9 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('clone_task',$task_id))) {
10 exit;
11 }
12 $task_name = $wppmfunction->get_task_fields($task_id,'task_name');
13 ob_start();
14
15 ?>
16 <form id="frm_edit_clone_task_name">
17 <div class="form-group">
18 <input type="text" id="task_name"class="form-control" name="task_name" value="<?php echo esc_attr($task_name); ?>"/>
19 </div>
20 <input type="hidden" name="action" value="wppm_set_clone_task" />
21 <input type="hidden" name="task_id" value="<?php echo esc_attr($task_id) ?>" />
22 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr(wp_create_nonce('wppm_set_clone_task'))?>">
23 </form>
24
25 <?php
26
27 $body = ob_get_clean();
28
29 ob_start();
30
31 ?>
32 <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 esc_html_e('Cancel','taskbuilder');?></button>
33 <button type="button" class="btn <?php echo ($proj_id!=0)?'wppm_popup_action':'wppm_task_popup_action'?>" onclick="wppm_set_clone_task(<?php echo esc_attr($proj_id)?>)"><?php esc_html_e('Save Changes','taskbuilder');?></button>
34 <?php
35
36 $footer = ob_get_clean();
37
38 $response = array(
39 'body' => $body,
40 'footer' => $footer
41 );
42
43 echo wp_json_encode($response);
44 ?>