view-counter
11 months ago
appearance.blade.php
11 months ago
block-by-role.blade.php
11 months 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
11 months ago
export-reports.blade.php
11 months ago
first-day-of-week.blade.php
2 years ago
index.blade.php
2 years ago
pruner.blade.php
11 months ago
refresh-salt.blade.php
2 years ago
track-authenticated-users.blade.php
2 years ago
view-counter.blade.php
2 years ago
woocommerce.blade.php
11 months ago
pruner.blade.php
84 lines
| 1 | @php /** @var $pruner IAWP\Data_Pruning\Pruning_Scheduler */ @endphp |
| 2 | |
| 3 | <div data-controller="pruner" class="settings-container prune"> |
| 4 | <div class="heading"> |
| 5 | <h2><?php |
| 6 | esc_html_e('Automatically Delete Old Data', 'independent-analytics'); ?></h2> |
| 7 | <a class="tutorial-link" href="https://independentwp.com/knowledgebase/your-data/automatically-delete-old-data/" target="_blank"> |
| 8 | <?php |
| 9 | esc_html_e('Read Tutorial', 'independent-analytics'); ?> |
| 10 | </a> |
| 11 | </div> |
| 12 | <div class="schedule-notification <?php echo $pruner->is_enabled() ? 'is-scheduled' : ''; ?>" |
| 13 | data-pruner-target="statusMessage" |
| 14 | data-testid="data-pruner-notice"> |
| 15 | <span class="dashicons dashicons-yes-alt"></span> |
| 16 | <span class="dashicons dashicons-dismiss"></span> |
| 17 | <p><?php |
| 18 | $status_message = $pruner->status_message(); |
| 19 | if (!is_null($status_message)) { |
| 20 | echo wp_kses_post($status_message); |
| 21 | } ?> |
| 22 | </p> |
| 23 | </div> |
| 24 | <div class="iawp-section"> |
| 25 | <select data-pruner-target="cutoffs" data-action="pruner#selectChanged" data-testid="data-pruner-select"><?php |
| 26 | foreach ($pruner->cutoff_options() as $cutoff_option) : ?> |
| 27 | <option value="<?php echo esc_attr($cutoff_option[0]); ?>" <?php |
| 28 | echo $cutoff_option[0] === $pruner->get_pruning_cutoff() ? 'selected' : ''; ?>><?php echo esc_html($cutoff_option[1]); ?> |
| 29 | </option><?php |
| 30 | endforeach; ?> |
| 31 | </select> |
| 32 | </div> |
| 33 | <div class="button-group"> |
| 34 | <button class="iawp-button purple" |
| 35 | data-pruner-target="saveButton" |
| 36 | data-action="pruner#saveClick" |
| 37 | data-original-text="<?php esc_html_e('Save', 'independent-analytics'); ?>" |
| 38 | data-loading-text="<?php esc_html_e('Saving...', 'independent-analytics'); ?>" |
| 39 | disabled="disabled" |
| 40 | data-testid="save-data-pruner" |
| 41 | > |
| 42 | <?php esc_html_e('Save', 'independent-analytics'); ?> |
| 43 | </button> |
| 44 | </div> |
| 45 | <!-- Confirmation modal --> |
| 46 | <div id="prune-modal" aria-hidden="true" class="mm micromodal-slide" data-testid="prune-modal"> |
| 47 | <div tabindex="-1" class="mm__overlay" data-action="click->pruner#cancelConfirmation"> |
| 48 | <div role="dialog" aria-modal="true" aria-labelledby="raa-modal-title" |
| 49 | class="mm__container"> |
| 50 | <h1><?php |
| 51 | esc_html_e('Enable automatic data deletion', 'independent-analytics'); ?></h1> |
| 52 | <p> |
| 53 | <?php |
| 54 | esc_html_e( |
| 55 | 'This will delete all data older then the selected timeframe, reducing the size of the database tables that Independent Analytics uses.', |
| 56 | 'independent-analytics' |
| 57 | ) ?> |
| 58 | </p> |
| 59 | <p> |
| 60 | <strong data-pruner-target="confirmationText" data-testid="date-confirmation"></strong> |
| 61 | </p> |
| 62 | <button type="submit" |
| 63 | class="iawp-button purple" |
| 64 | data-action="pruner#confirmClick" |
| 65 | data-pruner-target="confirmButton" |
| 66 | data-original-text="<?php esc_attr_e('Enable Automatic Data Deletion', 'independent-analytics'); ?>" |
| 67 | data-loading-text="<?php esc_attr_e('Enabling Automatic Data Deletion...', 'independent-analytics'); ?>" |
| 68 | data-testid="submit-data-pruner" |
| 69 | > |
| 70 | <?php |
| 71 | esc_html_e('Enable Automatic Data Deletion', 'independent-analytics'); ?> |
| 72 | </button> |
| 73 | <button class="iawp-button ghost-purple" |
| 74 | data-action="pruner#cancelConfirmation" |
| 75 | data-testid="close-data-pruner" |
| 76 | > |
| 77 | <?php |
| 78 | esc_html_e('Cancel', 'independent-analytics') ?> |
| 79 | </button> |
| 80 | </div> |
| 81 | </div> |
| 82 | </div> |
| 83 | </div> |
| 84 |