woocommerce/includes/admin/views/html-admin-page-status-logs...

32 lines
814 B
PHP
Raw Normal View History

2016-11-20 18:16:18 +00:00
<?php
/**
* Admin View: Page - Status Database Logs
*
2020-08-05 16:36:24 +00:00
* @package WooCommerce\Admin\Logs
2016-11-20 18:16:18 +00:00
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<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
<?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
wc_enqueue_js(
"jQuery( '#flush-logs' ).on( '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;
});"
);