← All changes
|
includes/admin/settings/wppm_get_add_task_status.php
+47
-47
5.0.1
→
6.0.6
View file →
| @@ -1,47 +1,47 @@ | ||
| 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') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { | |
| 8 | - exit; | |
| 9 | -} | |
| 10 | -ob_start(); | |
| 11 | -?> | |
| 12 | -<div class="form-group"> | |
| 13 | - <label for="wppm_task_status_name"><?php echo esc_html_e('Status Name','taskbuilder');?></label> | |
| 14 | - <p class="help-block"><?php echo esc_html_e('Insert status name. Please make sure status name you are entering should not already exist.','taskbuilder');?></p> | |
| 15 | - <input id="wppm_task_status_name" class="form-control" name="wppm_task_status_name" value="" /> | |
| 16 | -</div> | |
| 17 | -<div class="form-group"> | |
| 18 | - <label for="wppm_task_status_color"><?php echo esc_html_e('Color','taskbuilder');?></label> | |
| 19 | - <p class="help-block"><?php echo esc_html_e('Text color of status.','taskbuilder');?></p> | |
| 20 | - <input id="wppm_task_status_color" class="wppm_color_picker" name="wppm_task_status_color" value="#ffffff" /> | |
| 21 | -</div> | |
| 22 | -<div class="form-group"> | |
| 23 | - <label for="wppm_task_status_bg_color"><?php echo esc_html_e('Background Color','taskbuilder');?></label> | |
| 24 | - <p class="help-block"><?php echo esc_html_e('Background color of status.','taskbuilder');?></p> | |
| 25 | - <input id="wppm_task_status_bg_color" class="wppm_color_picker" name="wppm_task_status_bg_color" value="#1E90FF" /> | |
| 26 | -</div> | |
| 27 | -<input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_task_status' ) ); ?>"> | |
| 28 | -<script> | |
| 29 | - jQuery(document).ready(function(){ | |
| 30 | - jQuery('.wppm_color_picker').wpColorPicker(); | |
| 31 | - }); | |
| 32 | -</script> | |
| 33 | -<?php | |
| 34 | -$body = ob_get_clean(); | |
| 35 | -ob_start(); | |
| 36 | -?> | |
| 37 | -<button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button> | |
| 38 | -<button type="button" class="btn wppm_popup_action" onclick="wppm_set_add_task_status();"><?php echo esc_html_e('Submit','taskbuilder');?></button> | |
| 39 | -<?php | |
| 40 | -$footer = ob_get_clean(); | |
| 41 | - | |
| 42 | -$output = array( | |
| 43 | - 'body' => $body, | |
| 44 | - 'footer' => $footer | |
| 45 | -); | |
| 46 | - | |
| 47 | -echo json_encode($output); | |
| 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') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { | |
| 8 | + exit; | |
| 9 | +} | |
| 10 | +ob_start(); | |
| 11 | +?> | |
| 12 | +<div class="form-group"> | |
| 13 | + <label for="wppm_task_status_name"><?php echo esc_html_e('Status Name','taskbuilder');?></label> | |
| 14 | + <p class="help-block"><?php echo esc_html_e('Insert status name. Please make sure status name you are entering should not already exist.','taskbuilder');?></p> | |
| 15 | + <input id="wppm_task_status_name" class="form-control" name="wppm_task_status_name" value="" /> | |
| 16 | +</div> | |
| 17 | +<div class="form-group"> | |
| 18 | + <label for="wppm_task_status_color"><?php echo esc_html_e('Color','taskbuilder');?></label> | |
| 19 | + <p class="help-block"><?php echo esc_html_e('Text color of status.','taskbuilder');?></p> | |
| 20 | + <input id="wppm_task_status_color" class="wppm_color_picker" name="wppm_task_status_color" value="#ffffff" /> | |
| 21 | +</div> | |
| 22 | +<div class="form-group"> | |
| 23 | + <label for="wppm_task_status_bg_color"><?php echo esc_html_e('Background Color','taskbuilder');?></label> | |
| 24 | + <p class="help-block"><?php echo esc_html_e('Background color of status.','taskbuilder');?></p> | |
| 25 | + <input id="wppm_task_status_bg_color" class="wppm_color_picker" name="wppm_task_status_bg_color" value="#1E90FF" /> | |
| 26 | +</div> | |
| 27 | +<input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_task_status' ) ); ?>"> | |
| 28 | +<script> | |
| 29 | + jQuery(document).ready(function(){ | |
| 30 | + jQuery('.wppm_color_picker').wpColorPicker(); | |
| 31 | + }); | |
| 32 | +</script> | |
| 33 | +<?php | |
| 34 | +$body = ob_get_clean(); | |
| 35 | +ob_start(); | |
| 36 | +?> | |
| 37 | +<button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button> | |
| 38 | +<button type="button" class="btn wppm_popup_action" onclick="wppm_set_add_task_status();"><?php echo esc_html_e('Submit','taskbuilder');?></button> | |
| 39 | +<?php | |
| 40 | +$footer = ob_get_clean(); | |
| 41 | + | |
| 42 | +$output = array( | |
| 43 | + 'body' => $body, | |
| 44 | + 'footer' => $footer | |
| 45 | +); | |
| 46 | + | |
| 47 | +echo wp_json_encode($output); | |