view-counter
11 months ago
appearance.blade.php
11 months ago
block-by-role.blade.php
2 days ago
block-ips.blade.php
11 months ago
capabilities.blade.php
11 months ago
delete.blade.php
11 months ago
disable-admin-toolbar-analytics.blade.php
2 years ago
disable-views-column.blade.php
1 year ago
disable-widget.blade.php
2 years ago
email-reports.blade.php
2 months ago
export-reports.blade.php
2 days ago
first-day-of-week.blade.php
2 years ago
index.blade.php
2 years ago
pruner.blade.php
2 days ago
track-authenticated-users.blade.php
2 years ago
view-counter.blade.php
2 days ago
visitor-salt-refresh-interval.blade.php
2 days ago
woocommerce.blade.php
2 days ago
email-reports.blade.php
197 lines
| 1 | <div class="email-reports settings-container"> |
| 2 | <div class="heading"> |
| 3 | <h2><?php esc_html_e('Email Report', 'independent-analytics'); ?></h2> |
| 4 | <a class="tutorial-link" href="https://independentwp.com/knowledgebase/pro/email-reports/" target="_blank"> |
| 5 | <?php esc_html_e('Read Tutorial', 'independent-analytics'); ?> |
| 6 | </a> |
| 7 | <div class="pro-tag"><?php esc_html_e('Pro', 'independent-analytics'); ?></div> |
| 8 | </div> |
| 9 | <form method='post' action='options.php' id="email-reports-form" class="email-reports-form"> |
| 10 | <input type='hidden' name='option_page' value='iawp_email_report_settings'/> |
| 11 | <input type="hidden" name="action" value="update"/> |
| 12 | <input type="hidden" name="_wp_http_referer" |
| 13 | value="/wp-admin/admin.php?page=independent-analytics-settings"> |
| 14 | <?php wp_nonce_field('iawp_email_report_settings-options'); ?> |
| 15 | <div class="inner"> |
| 16 | <?php if($is_scheduled): ?> |
| 17 | <div id="next-email" class="schedule-notification is-scheduled" data-timestamp="<?php echo absint($timestamp); ?>"> |
| 18 | <span class="dashicons dashicons-yes-alt"></span> |
| 19 | <p><?php echo wp_kses_post($scheduled_date); ?></p> |
| 20 | <button class="iawp-button" type="button" data-controller="pause-emails" data-action="pause-emails#pause"><?php esc_html_e('Pause Emails', 'independent-analytics'); ?></button> |
| 21 | </div> |
| 22 | <?php elseif($is_paused): ?> |
| 23 | <div id="next-email" class="schedule-notification is-paused" data-timestamp="<?php echo absint($timestamp); ?>"> |
| 24 | <span class="dashicons dashicons-controls-pause"></span> |
| 25 | <p><?php esc_html_e('Emails are currently paused.', 'independent-analytics'); ?></p> |
| 26 | <button class="iawp-button" type="button" data-controller="pause-emails" data-action="pause-emails#resume"><?php esc_html_e('Resume Emails', 'independent-analytics'); ?></button> |
| 27 | </div> |
| 28 | <?php else: ?> |
| 29 | <div id="next-email" class="schedule-notification is-not-scheduled"> |
| 30 | <span class="dashicons dashicons-dismiss"></span> |
| 31 | <p><?php echo wp_kses_post($scheduled_date); ?></p> |
| 32 | </div> |
| 33 | <?php endif; ?> |
| 34 | <div class="delivery-interval iawp-section"> |
| 35 | <h3><?php esc_html_e('Delivery Interval', 'independent-analytics'); ?></h3> |
| 36 | <select id="iawp_email_report_interval" name="iawp_email_report_interval"> |
| 37 | <option value="monthly" <?php selected($interval, 'monthly', true); ?>><?php esc_html_e('Monthly', 'independent-analytics'); ?></option> |
| 38 | <option value="weekly" <?php selected($interval, 'weekly', true); ?>><?php esc_html_e('Weekly', 'independent-analytics'); ?></option> |
| 39 | <option value="daily" <?php selected($interval, 'daily', true); ?>><?php esc_html_e('Daily', 'independent-analytics'); ?></option> |
| 40 | </select> |
| 41 | <p id="monthly-interval-note" class="interval-note"><?php esc_html_e('The email will be delivered on the 1st of every month.', 'independent-analytics'); ?></p> |
| 42 | <p id="weekly-interval-note" class="interval-note"><?php esc_html_e('The email will be delivered on the first day of the week (selected in the settings above).', 'independent-analytics'); ?></p> |
| 43 | <p id="daily-interval-note" class="interval-note"><?php esc_html_e('The email will be delivered every day.', 'independent-analytics'); ?></p> |
| 44 | </div> |
| 45 | <div class="delivery-time iawp-section"> |
| 46 | <h3><?php esc_html_e('Delivery Time', 'independent-analytics'); ?></h3> |
| 47 | <select id="iawp_email_report_time" name="iawp_email_report_time"> |
| 48 | <?php for ($i = 0; $i < 24; $i++) { |
| 49 | $readable_time = new DateTime(date('Y-m-d') . ' ' . $i . ':00:00', new \DateTimeZone('utc')); |
| 50 | $readable_time = $readable_time->format(iawp()->get_option('time_format', 'g:i a')); ?> |
| 51 | <option value="<?php echo esc_attr($i); ?>" <?php selected($time, $i, true); ?>><?php echo esc_html($readable_time); ?></option> |
| 52 | <?php |
| 53 | } ?> |
| 54 | </select> |
| 55 | </div> |
| 56 | <div class="custom-colors iawp-section"> |
| 57 | <h3><?php esc_html_e('Customize the colors', 'independent-analytics'); ?></h3> |
| 58 | <div class="custom-colors-list"> |
| 59 | <div class="custom-color"> |
| 60 | <p class="element-name"><?php esc_html_e('Header background', 'independent-analytics'); ?></p> |
| 61 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[0]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[0]); ?>" /> |
| 62 | </div> |
| 63 | <div class="custom-color"> |
| 64 | <p class="element-name"><?php esc_html_e('Header text', 'independent-analytics'); ?></p> |
| 65 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[1]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[1]); ?>" /> |
| 66 | </div> |
| 67 | <div class="custom-color"> |
| 68 | <p class="element-name"><?php esc_html_e('Sub-header background', 'independent-analytics'); ?></p> |
| 69 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[2]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[2]); ?>" /> |
| 70 | </div> |
| 71 | <div class="custom-color"> |
| 72 | <p class="element-name"><?php esc_html_e('Sub-header text', 'independent-analytics'); ?></p> |
| 73 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[3]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[3]); ?>" /> |
| 74 | </div> |
| 75 | <div class="custom-color"> |
| 76 | <p class="element-name"><?php esc_html_e('Bar chart', 'independent-analytics'); ?></p> |
| 77 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[4]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[4]); ?>" /> |
| 78 | </div> |
| 79 | <div class="custom-color"> |
| 80 | <p class="element-name"><?php esc_html_e('Bar chart accent', 'independent-analytics'); ?></p> |
| 81 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[5]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[5]); ?>" /> |
| 82 | </div> |
| 83 | <div class="custom-color"> |
| 84 | <p class="element-name"><?php esc_html_e('Borders', 'independent-analytics'); ?></p> |
| 85 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[6]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[6]); ?>" /> |
| 86 | </div> |
| 87 | <div class="custom-color"> |
| 88 | <p class="element-name"><?php esc_html_e('Metric background', 'independent-analytics'); ?></p> |
| 89 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[7]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[7]); ?>" /> |
| 90 | </div> |
| 91 | <div class="custom-color"> |
| 92 | <p class="element-name"><?php esc_html_e('Outer background', 'independent-analytics'); ?></p> |
| 93 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[8]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[8]); ?>" /> |
| 94 | </div> |
| 95 | <div class="custom-color"> |
| 96 | <p class="element-name"><?php esc_html_e('Footer background', 'independent-analytics'); ?></p> |
| 97 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[9]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[9]); ?>" /> |
| 98 | </div> |
| 99 | <div class="custom-color"> |
| 100 | <p class="element-name"><?php esc_html_e('Footer text', 'independent-analytics'); ?></p> |
| 101 | <input type="text" class="iawp-color-picker" value="<?php echo sanitize_hex_color($input_default[10]); ?>" data-default-color="<?php echo sanitize_hex_color($default_colors[10]); ?>" /> |
| 102 | </div> |
| 103 | </div> |
| 104 | <input type="hidden" id="iawp_email_report_colors" name="iawp_email_report_colors" value="<?php echo implode(',', $input_default); ?>" /> |
| 105 | </div> |
| 106 | <div class="from-email iawp-section"> |
| 107 | <h3><?php esc_html_e('From email address', 'independent-analytics'); ?></h3> |
| 108 | <input type="email" |
| 109 | name="iawp_email_report_from_address" |
| 110 | id="iawp_email_report_from_address" |
| 111 | data-option="iawp_email_report_from_address" |
| 112 | value="<?php echo esc_attr($from); ?>"> |
| 113 | <p class="description"><?php esc_html_e('The email address should come from this domain or your emails may not be delivered.', 'independent-analytics'); ?></p> |
| 114 | </div> |
| 115 | <div class="reply-to-email iawp-section"> |
| 116 | <h3><?php esc_html_e('Reply To email address', 'independent-analytics'); ?></h3> |
| 117 | <input type="email" |
| 118 | name="iawp_email_report_reply_to_address" |
| 119 | id="iawp_email_report_reply_to_address" |
| 120 | data-option="iawp_email_report_reply_to_address" |
| 121 | value="<?php echo esc_attr($reply_to); ?>"> |
| 122 | <p class="description"><?php esc_html_e('Any replies to the email report will be delivered to this email address.', 'independent-analytics'); ?></p> |
| 123 | </div> |
| 124 | <div class="email-footer-text iawp-section"> |
| 125 | <h3><?php esc_html_e('Email footer text', 'independent-analytics'); ?></h3> |
| 126 | <textarea type="email" |
| 127 | name="iawp_email_report_footer" |
| 128 | id="iawp_email_report_footer" |
| 129 | data-option="iawp_email_report_footer" |
| 130 | rows=2> |
| 131 | <?php echo esc_html($footer_text); ?> |
| 132 | </textarea> |
| 133 | </div> |
| 134 | <div class="email-addresses iawp-section"> |
| 135 | <h3><?php esc_html_e('Add new email addresses', 'independent-analytics'); ?></h3> |
| 136 | <div class="new-address duplicator"> |
| 137 | <div class="entry"> |
| 138 | <input class="new-field" type="email" placeholder="name@email.com" value="" /> |
| 139 | <button class="iawp-button purple duplicate-button"><?php esc_html_e('Add email', 'independent-analytics'); ?></button> |
| 140 | </div> |
| 141 | <div class="blueprint"> |
| 142 | <div class="entry"> |
| 143 | <input type="text" readonly |
| 144 | name="iawp_email_report_email_addresses[]" |
| 145 | id="iawp_email_report_email_addresses[]" |
| 146 | data-option="iawp_email_report_email_addresses" |
| 147 | value=""> |
| 148 | <button class="remove iawp-button ghost-purple"><?php esc_html_e('Remove email', 'independent-analytics'); ?></button> |
| 149 | </div> |
| 150 | </div> |
| 151 | <p class="error-message empty"><?php esc_html_e('Input is empty', 'independent-analytics'); ?></p> |
| 152 | <p class="error-message exists"><?php esc_html_e('This email already exists', 'independent-analytics'); ?></p> |
| 153 | </div> |
| 154 | <div class="saved"> |
| 155 | <h3><?php esc_html_e('Sending to these addresses', 'independent-analytics'); ?></h3> |
| 156 | <?php for ($i = 0; $i < count($emails); $i++) : ?> |
| 157 | <div class="entry"> |
| 158 | <input type="email" readonly |
| 159 | id="iawp_email_report_email_addresses[<?php echo esc_attr($i); ?>]" |
| 160 | name="iawp_email_report_email_addresses[<?php echo esc_attr($i); ?>]" |
| 161 | data-option="iawp_email_report_email_addresses" |
| 162 | value="<?php echo esc_attr($emails[$i]); ?>" /> |
| 163 | <button class="remove iawp-button ghost-purple"><?php esc_html_e('Remove email', 'independent-analytics'); ?></button> |
| 164 | </div> |
| 165 | <?php endfor; ?> |
| 166 | </div> |
| 167 | </div> |
| 168 | <div class="save-button-container"> |
| 169 | <?php submit_button(esc_html__('Save settings', 'independent-analytics'), 'save-email iawp-button purple', 'save-email-report-settings', false); ?> |
| 170 | <button id="preview-email" class="preview-email iawp-button ghost-purple"><span class="dashicons dashicons-visibility"></span> <?php esc_html_e('Preview email', 'independent-analytics'); ?></button> |
| 171 | <button id="test-email" class="test-email iawp-button ghost-purple"><span class="dashicons dashicons-email-alt2"></span> <?php esc_html_e('Send test email', 'independent-analytics'); ?></button> |
| 172 | <p class="warning-message"><span class="dashicons dashicons-warning"></span> <?php esc_html_e('Unsaved changes', 'independent-analytics'); ?></p> |
| 173 | </div> |
| 174 | </div> |
| 175 | </form> |
| 176 | </div> |
| 177 | <div id="email-test-modal" class="email-test-modal"> |
| 178 | <div class="title-med"><?php esc_html_e('Send Test Email', 'independent-analytics'); ?></div> |
| 179 | <legend><?php esc_html_e('Choose email recipients:', 'independent-analytics'); ?></legend> |
| 180 | <label for="first"> |
| 181 | <input type="radio" id="first" name="email-recipient" value="first" checked /> |
| 182 | <?php esc_html_e('First email address only', 'independent-analytics'); ?> |
| 183 | </label> |
| 184 | <label for="all"> |
| 185 | <input type="radio" id="all" name="email-recipient" value="all" /> |
| 186 | <?php esc_html_e('All email addresses', 'independent-analytics'); ?> |
| 187 | </label> |
| 188 | <div class="buttons"> |
| 189 | <button id="send-test-email" class="send-test-email iawp-button purple"><?php esc_html_e('Send test email', 'independent-analytics'); ?></button> |
| 190 | <button id="cancel-test-email" class="cancel-test-email iawp-button ghost-purple"><?php esc_html_e('Cancel', 'independent-analytics'); ?></button> |
| 191 | </div> |
| 192 | </div> |
| 193 | <div id="email-preview-container" class="email-preview-container"> |
| 194 | <div id="email-preview" class="email-preview"></div> |
| 195 | <button id="close-email-preview" class="close-email-preview"><span class="dashicons dashicons-dismiss"></span></button> |
| 196 | </div> |
| 197 |