| 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 |
ob_start(); |
| 9 |
?> |
| 10 |
<div class="form-group"> |
| 11 |
<label for="wppm_priority_name"><?php echo esc_html_e('Priority Name','taskbuilder');?></label> |
| 12 |
<p class="help-block"><?php echo esc_html_e('Insert priority name. Please make sure priority name you are entering should not already exist.','taskbuilder');?></p> |
| 13 |
<input id="wppm_priority_name" class="form-control" name="wppm_priority_name" value="" /> |
| 14 |
</div> |
| 15 |
<div class="form-group"> |
| 16 |
<label for="wppm_priority_color"><?php echo esc_html_e('Color','taskbuilder');?></label> |
| 17 |
<p class="help-block"><?php echo esc_html_e('Text color of status.','taskbuilder');?></p> |
| 18 |
<input id="wppm_priority_color" class="wppm_color_picker" name="wppm_priority_color" value="#ffffff" /> |
| 19 |
</div> |
| 20 |
<div class="form-group"> |
| 21 |
<label for="wppm_priority_bg_color"><?php echo esc_html_e('Background Color','taskbuilder');?></label> |
| 22 |
<p class="help-block"><?php echo esc_html_e('Background color of priority.','taskbuilder');?></p> |
| 23 |
<input id="wppm_priority_bg_color" class="wppm_color_picker" name="wppm_priority_bg_color" value="#1E90FF" /> |
| 24 |
</div> |
| 25 |
<input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_priority' ) ); ?>"> |
| 26 |
<script> |
| 27 |
jQuery(document).ready(function(){ |
| 28 |
jQuery('.wppm_color_picker').wpColorPicker(); |
| 29 |
}); |
| 30 |
</script> |
| 31 |
<?php |
| 32 |
$body = ob_get_clean(); |
| 33 |
ob_start(); |
| 34 |
?> |
| 35 |
<button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button> |
| 36 |
<button type="button" class="btn wppm_popup_action" onclick="wppm_set_add_priority();"><?php echo esc_html_e('Submit','taskbuilder');?></button> |
| 37 |
<?php |
| 38 |
$footer = ob_get_clean(); |
| 39 |
|
| 40 |
$output = array( |
| 41 |
'body' => $body, |
| 42 |
'footer' => $footer |
| 43 |
); |
| 44 |
|
| 45 |
echo json_encode($output); |
| 46 |
|