2016-11-20 18:16:18 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Admin View: Page - Status Database Logs
|
2017-11-10 12:55:58 +00:00
|
|
|
*
|
|
|
|
* @package WooCommerce/Admin/Logs
|
2016-11-20 18:16:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2017-11-10 12:55:58 +00:00
|
|
|
?>
|
|
|
|
<form method="post" id="mainform" action="">
|
|
|
|
<?php $log_table_list->search_box( __( 'Search logs', 'woocommerce' ), 'log' ); ?>
|
2016-11-20 18:16:18 +00:00
|
|
|
<?php $log_table_list->display(); ?>
|
|
|
|
|
|
|
|
<input type="hidden" name="page" value="wc-status" />
|
2016-12-03 21:26:36 +00:00
|
|
|
<input type="hidden" name="tab" value="logs" />
|
2016-11-26 19:05:59 +00:00
|
|
|
|
2016-12-15 21:03:12 +00:00
|
|
|
<?php submit_button( __( 'Flush all logs', 'woocommerce' ), 'delete', 'flush-logs' ); ?>
|
|
|
|
<?php wp_nonce_field( 'woocommerce-status-logs' ); ?>
|
2016-11-20 18:16:18 +00:00
|
|
|
</form>
|
2016-11-27 18:15:13 +00:00
|
|
|
<?php
|
2018-03-05 18:59:17 +00:00
|
|
|
wc_enqueue_js(
|
|
|
|
"jQuery( '#flush-logs' ).click( function() {
|
2016-11-27 18:15:13 +00:00
|
|
|
if ( window.confirm('" . esc_js( __( 'Are you sure you want to clear all logs from the database?', 'woocommerce' ) ) . "') ) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2018-03-05 18:59:17 +00:00
|
|
|
});"
|
|
|
|
);
|