| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $current_user,$wpdb,$wppmfunction; |
| 7 |
$settings = get_option("wppm-ap-task-list"); |
| 8 |
$wppm_ap_settings = get_option("wppm-ap-settings"); |
| 9 |
if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
?> |
| 13 |
<form action="#" onsubmit="return false;" class="wppm-frm-ap-tl"> |
| 14 |
<div class="wppm-input-group"> |
| 15 |
<div class="label-container"> |
| 16 |
<label for=""><?php esc_attr_e( 'List header button', 'taskbuilder' ); ?></label> |
| 17 |
</div> |
| 18 |
<table class="wppm-ap-table"> |
| 19 |
<tr> |
| 20 |
<td><?php esc_attr_e( 'Background color', 'taskbuilder' ); ?></td> |
| 21 |
<td><?php esc_attr_e( 'Text color', 'taskbuilder' ); ?></td> |
| 22 |
<td><?php esc_attr_e( 'Hover color', 'taskbuilder' ); ?></td> |
| 23 |
</tr> |
| 24 |
<tr> |
| 25 |
<td><input class="wppm-color-picker" type="text" name="list-header-button-background-color" value="<?php echo esc_attr( $settings['list-header-button-background-color'] ); ?>"></td> |
| 26 |
<td><input class="wppm-color-picker" type="text" name="list-header-button-text-color" value="<?php echo esc_attr( $settings['list-header-button-text-color'] ); ?>"></td> |
| 27 |
<td><input class="wppm-color-picker" type="text" name="list-header-button-hover-color" value="<?php echo esc_attr( $settings['list-header-button-hover-color'] ); ?>"></td> |
| 28 |
</tr> |
| 29 |
</table> |
| 30 |
</div> |
| 31 |
<div class="wppm-input-group"> |
| 32 |
<div class="label-container"> |
| 33 |
<label for=""><?php esc_attr_e( 'List header', 'taskbuilder' ); ?></label> |
| 34 |
</div> |
| 35 |
<table class="wppm-ap-table"> |
| 36 |
<tr> |
| 37 |
<td><?php esc_attr_e( 'Background color', 'taskbuilder' ); ?></td> |
| 38 |
<td><?php esc_attr_e( 'Text color', 'taskbuilder' ); ?></td> |
| 39 |
</tr> |
| 40 |
<tr> |
| 41 |
<td><input class="wppm-color-picker" type="text" name="list-header-background-color" value="<?php echo esc_attr( $settings['list-header-background-color'] ); ?>"></td> |
| 42 |
<td><input class="wppm-color-picker" type="text" name="list-header-text-color" value="<?php echo esc_attr( $settings['list-header-text-color'] ); ?>"></td> |
| 43 |
</tr> |
| 44 |
</table> |
| 45 |
</div> |
| 46 |
<div class="wppm-input-group"> |
| 47 |
<div class="label-container"> |
| 48 |
<label for=""><?php esc_attr_e( 'List item (odd)', 'taskbuilder' ); ?></label> |
| 49 |
</div> |
| 50 |
<table class="wpsc-ap-table"> |
| 51 |
<tr> |
| 52 |
<td><?php esc_attr_e( 'Background color', 'taskbuilder' ); ?></td> |
| 53 |
<td><?php esc_attr_e( 'Text color', 'taskbuilder' ); ?></td> |
| 54 |
</tr> |
| 55 |
<tr> |
| 56 |
<td><input class="wppm-color-picker" type="text" name="list-item-odd-background-color" value="<?php echo esc_attr( $settings['list-item-odd-background-color'] ); ?>"></td> |
| 57 |
<td><input class="wppm-color-picker" type="text" name="list-item-odd-text-color" value="<?php echo esc_attr( $settings['list-item-odd-text-color'] ); ?>"></td> |
| 58 |
</tr> |
| 59 |
</table> |
| 60 |
</div> |
| 61 |
<div class="wppm-input-group"> |
| 62 |
<div class="label-container"> |
| 63 |
<label for=""><?php esc_attr_e( 'List item (even)', 'taskbuilder' ); ?></label> |
| 64 |
</div> |
| 65 |
<table class="wppm-ap-table"> |
| 66 |
<tr> |
| 67 |
<td><?php esc_attr_e( 'Background color', 'taskbuilder' ); ?></td> |
| 68 |
<td><?php esc_attr_e( 'Text color', 'taskbuilder' ); ?></td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<td><input class="wppm-color-picker" type="text" name="list-item-even-background-color" value="<?php echo esc_attr( $settings['list-item-even-background-color'] ); ?>"></td> |
| 72 |
<td><input class="wppm-color-picker" type="text" name="list-item-even-text-color" value="<?php echo esc_attr( $settings['list-item-even-text-color'] ); ?>"></td> |
| 73 |
</tr> |
| 74 |
</table> |
| 75 |
</div> |
| 76 |
<div class="wppm-input-group"> |
| 77 |
<div class="label-container"> |
| 78 |
<label for=""><?php esc_attr_e( 'List item (hover)', 'taskbuilder' ); ?></label> |
| 79 |
</div> |
| 80 |
<table class="wppm-ap-table"> |
| 81 |
<tr> |
| 82 |
<td><?php esc_attr_e( 'Background color', 'taskbuilder' ); ?></td> |
| 83 |
<td><?php esc_attr_e( 'Text color', 'taskbuilder' ); ?></td> |
| 84 |
</tr> |
| 85 |
<tr> |
| 86 |
<td><input class="wppm-color-picker" type="text" name="list-item-hover-background-color" value="<?php echo esc_attr( $settings['list-item-hover-background-color'] ); ?>"></td> |
| 87 |
<td><input class="wppm-color-picker" type="text" name="list-item-hover-text-color" value="<?php echo esc_attr( $settings['list-item-hover-text-color'] ); ?>"></td> |
| 88 |
</tr> |
| 89 |
</table> |
| 90 |
</div> |
| 91 |
<input type="hidden" name="action" value="wppm_set_ap_task_list"> |
| 92 |
<input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_ap_task_list' ) ); ?>"> |
| 93 |
<script>jQuery('.wppm-color-picker').wpColorPicker();</script> |
| 94 |
<style> |
| 95 |
.wppm-ap-table td {padding: 5px;} |
| 96 |
.wppm-ap-table table, .wppm-ap-table td {border: 1px solid #c3c3c3;} |
| 97 |
</style> |
| 98 |
</form> |
| 99 |
<div class="setting-footer-actions"> |
| 100 |
<button |
| 101 |
class="wppm-submit-btn" |
| 102 |
onclick="wppm_set_ap_task_list();" style="background-color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-bg-color'])?>!important;color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-text-color'])?>!important;"> |
| 103 |
<?php esc_attr_e( 'Save Changes', 'taskbuilder' ); ?></button> |
| 104 |
<button |
| 105 |
class="wppm_reset_btn" id="wppm_reset_ap_task_list_btn" |
| 106 |
onclick="wppm_reset_ap_task_list(this);"> |
| 107 |
<?php esc_attr_e( 'Reset default', 'taskbuilder' ); ?></button> |
| 108 |
<input type="hidden" name="wppm_reset_ap_task_list_ajax_nonce" id="wppm_reset_ap_task_list_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_reset_ap_task_list' ) ); ?>"> |
| 109 |
<span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="edit"></span> |
| 110 |
</div> |
| 111 |
<?php |
| 112 |
wp_die(); |