view_counter
3 years ago
block_by_role.php
3 years ago
block_ips.php
3 years ago
capabilities.php
3 years ago
dark_mode.php
3 years ago
delete.php
3 years ago
email_reports.php
3 years ago
export.php
3 years ago
first_day_of_week.php
3 years ago
index.php
3 years ago
notice.php
3 years ago
track_authenticated_users.php
3 years ago
view_counter.php
3 years ago
email_reports.php
68 lines
| 1 | <div class="email-reports settings-container"> |
| 2 | <h2><?php esc_html_e('Email Report', 'iawp'); ?></h2> |
| 3 | <div class="pro-tag"><?php esc_html_e('Pro', 'iawp'); ?></div> |
| 4 | <p><?php esc_html_e('Schedule an automated email report for the 1st of every month.', 'iawp'); ?></p> |
| 5 | <form method='post' action='options.php' id="email-reports-form" class="email-reports-form"> |
| 6 | <input type='hidden' name='option_page' value='iawp_email_report_settings'/> |
| 7 | <input type="hidden" name="action" value="update"/> |
| 8 | <input type="hidden" name="_wp_http_referer" |
| 9 | value="/wp-admin/admin.php?page=independent-analytics&tab=settings"> |
| 10 | <?php wp_nonce_field('iawp_email_report_settings-options'); ?> |
| 11 | <div class="inner"> |
| 12 | <div class="delivery-time section"> |
| 13 | <h3><?php esc_html_e('Delivery Time', 'iawp'); ?></h3> |
| 14 | <select id="iawp_email_report_time" name="iawp_email_report_time"> |
| 15 | <?php for ($i = 0; $i < 24; $i++) { |
| 16 | $readable_time = new DateTime(date('Y-m-d') . ' ' . $i . ':00:00'); |
| 17 | $readable_time = $readable_time->format(get_option('time_format')); ?> |
| 18 | <option value="<?php esc_attr_e($i); ?>" <?php selected($time, $i, true); ?>><?php esc_html_e($readable_time); ?></option> |
| 19 | <?php |
| 20 | } ?> |
| 21 | </select> |
| 22 | </div> |
| 23 | <div class="message section"> |
| 24 | <h3><?php esc_html_e('Email message', 'iawp'); ?></h3> |
| 25 | <textarea rows="5" id="iawp_email_report_message" name="iawp_email_report_message"><?php esc_html_e($message); ?></textarea> |
| 26 | </div> |
| 27 | <div class="email-addresses section"> |
| 28 | <h3><?php esc_html_e('Add new email addresses', 'iawp'); ?></h3> |
| 29 | <div class="new-address duplicator"> |
| 30 | <div class="entry"> |
| 31 | <input class="new-field" type="email" placeholder="name@email.com" value="" /> |
| 32 | <button class="iawp-button purple duplicate-button"><?php esc_html_e('Add email', 'iawp'); ?></button> |
| 33 | </div> |
| 34 | <div class="blueprint"> |
| 35 | <div class="entry"> |
| 36 | <input type="text" readonly |
| 37 | name="iawp_email_report_email_addresses[]" |
| 38 | id="iawp_email_report_email_addresses[]" |
| 39 | data-option="iawp_email_report_email_addresses" |
| 40 | value=""> |
| 41 | <button class="remove iawp-button ghost-purple"><?php esc_html_e('Remove email', 'iawp'); ?></button> |
| 42 | </div> |
| 43 | </div> |
| 44 | <p class="error-message empty"><?php esc_html_e('Input is empty', 'iawp'); ?></p> |
| 45 | <p class="error-message exists"><?php esc_html_e('This email already exists', 'iawp'); ?></p> |
| 46 | </div> |
| 47 | <div class="saved"> |
| 48 | <h3><?php esc_html_e('Sending to these addresses', 'iawp'); ?></h3> |
| 49 | <?php for ($i = 0; $i < count($emails); $i++) : ?> |
| 50 | <div class="entry"> |
| 51 | <input type="email" readonly |
| 52 | id="iawp_email_report_email_addresses[<?php esc_attr_e($i); ?>]" |
| 53 | name="iawp_email_report_email_addresses[<?php esc_attr_e($i); ?>]" |
| 54 | data-option="iawp_email_report_email_addresses" |
| 55 | value="<?php esc_attr_e($emails[$i]); ?>" /> |
| 56 | <button class="remove iawp-button ghost-purple"><?php esc_html_e('Remove email', 'iawp'); ?></button> |
| 57 | </div> |
| 58 | <?php endfor; ?> |
| 59 | </div> |
| 60 | </div> |
| 61 | <div class="save-button-container"> |
| 62 | <?php submit_button(esc_html__('Save settings', 'iawp'), 'iawp-button purple', 'save-email-report-settings', false); ?> |
| 63 | <button id="test-email" class="test-email iawp-button ghost-purple"><?php esc_html_e('Send test email', 'iawp'); ?></button> |
| 64 | <p class="warning-message"><span class="dashicons dashicons-warning"></span> <?php esc_html_e('Unsaved changes', 'iawp'); ?></p> |
| 65 | </div> |
| 66 | </div> |
| 67 | </form> |
| 68 | </div> |