| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $current_user,$wpdb,$wppmfunction; |
| 7 |
if (!(($current_user->ID && $current_user->has_cap('wppm_admin')) || $current_user->has_cap('manage_options'))) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
$wppm_default_email_notification_to_current_user = get_option('wppm_default_email_notification_to_current_user'); |
| 11 |
?> |
| 12 |
<form id="wppm_en_frm_general_settings" method="post" action="javascript:wppm_set_en_general_settings();"> |
| 13 |
<div class="form-group"> |
| 14 |
<label for="wppm_en_from_name"><?php echo esc_html_e('From Name','taskbuilder');?></label> |
| 15 |
<p class="help-block"><?php echo esc_html_e('Emails to send by this name.','taskbuilder');?></p> |
| 16 |
<input type="text" class="form-control" name="wppm_en_from_name" id="wppm_en_from_name" value="<?php echo esc_attr(get_option('wppm_en_from_name',''));?>" /> |
| 17 |
</div> |
| 18 |
<div class="form-group"> |
| 19 |
<label for="wppm_en_from_email"><?php echo esc_html_e('From Email','taskbuilder');?></label> |
| 20 |
<p class="help-block"><?php echo esc_html_e('Emails to send from this email.','taskbuilder');?></p> |
| 21 |
<input type="text" class="form-control" name="wppm_en_from_email" id="wppm_en_from_email" value="<?php echo esc_attr(get_option('wppm_en_from_email',''));?>" /> |
| 22 |
</div> |
| 23 |
<div class="form-group"> |
| 24 |
<label for="wppm_en_ignore_emails"><?php echo esc_html_e('Block Emails','taskbuilder');?></label> |
| 25 |
<p class="help-block"><?php echo esc_html_e('Emails will not be sent to these email addresses. New email should begin on new line.','taskbuilder');?></p> |
| 26 |
<?php |
| 27 |
$ignore_emails = get_option('wppm_en_ignore_emails',array()); |
| 28 |
$ignore_emails = $wppmfunction->sanitize_array($ignore_emails); |
| 29 |
?> |
| 30 |
<textarea class="form-control" style="height:100px !important;" name="wppm_en_ignore_emails" id="wppm_en_ignore_emails"><?php echo esc_textarea( implode( "\n", $ignore_emails ) ); ?></textarea> |
| 31 |
</div> |
| 32 |
<hr> |
| 33 |
<span> |
| 34 |
<label><?php echo esc_html_e('Enable current user email notifications','taskbuilder');?></label> |
| 35 |
</span><br> |
| 36 |
<p class="help-block"><?php echo esc_html_e('Default enable/disable setting to send email notifications to current user (who is making some action like create task, change status, change assign user, new comment.etc).','taskbuilder');?></p> |
| 37 |
<select class="form-control" name="wppm_default_email_notification_to_current_user" id="wppm_default_email_notification_to_current_user"> |
| 38 |
<option value="1" <?php selected( $wppm_default_email_notification_to_current_user, '1' ); ?>> |
| 39 |
<?php esc_html_e( 'Enable', 'taskbuilder' ); ?> |
| 40 |
</option> |
| 41 |
<option value="0" <?php selected( $wppm_default_email_notification_to_current_user, '0' ); ?>> |
| 42 |
<?php esc_html_e( 'Disable', 'taskbuilder' ); ?> |
| 43 |
</option> |
| 44 |
</select> |
| 45 |
<hr> |
| 46 |
<?php do_action('wppm_get_en_gerneral_settings');?> |
| 47 |
<button type="submit" class="wppm-submit-btn"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> |
| 48 |
<span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="loading_icon"></span> |
| 49 |
<input type="hidden" name="action" value="wppm_set_en_general_settings" /> |
| 50 |
<input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_en_general_settings' ) ); ?>"> |
| 51 |
</form> |
| 52 |
|