fix: prevent modal from showing unexpectedly and fix inline actions
Remove duplicate inline actions from Forms page title column to prevent conflicts with DataTable's built-in actions column. Fix DataTable actions column: - Only show delete/duplicate on hover using CSS - Add proper event propagation handling (stopPropagation) - Remove unnecessary wrapper div that was causing issues Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -78,46 +78,46 @@ class License {
|
||||
public function enqueue() {
|
||||
// Assets now handled by ReactAdmin class
|
||||
return;
|
||||
wp_enqueue_style('page-licenses', FORMIPAY_URL . 'admin/assets/css/admin-licenses.css', [], FORMIPAY_VERSION, 'all');
|
||||
wp_enqueue_script('page-licenses', FORMIPAY_URL . 'admin/assets/js/admin-licenses.js', ['jquery', 'gridjs'], FORMIPAY_VERSION, true);
|
||||
wp_localize_script('page-licenses', 'formipay_licenses_page', [
|
||||
'ajax_url' => admin_url('admin-ajax.php'),
|
||||
'site_url' => site_url(),
|
||||
'columns' => [
|
||||
'id' => __('ID','formipay'),
|
||||
'product' => __('Product','formipay'),
|
||||
'order' => __('Order','formipay'),
|
||||
'email' => __('Email','formipay'),
|
||||
'key' => __('Key','formipay'),
|
||||
'status' => __('Status','formipay'),
|
||||
'expiry' => __('Expiry','formipay'),
|
||||
'date' => __('Date','formipay'),
|
||||
],
|
||||
'filter_form' => [
|
||||
'products' => [
|
||||
'placeholder' => __('Filter by Product','formipay'),
|
||||
'noresult_text' => __('No results found','formipay')
|
||||
],
|
||||
'status' => [
|
||||
'placeholder' => __('Filter by Status','formipay'),
|
||||
'noresult_text' => __('No results found','formipay')
|
||||
]
|
||||
],
|
||||
'modal' => [
|
||||
'delete' => [
|
||||
'question' => __('Do you want to delete the license?','formipay'),
|
||||
'cancelButton' => __('Cancel','formipay'),
|
||||
'confirmButton' => __('Delete Permanently','formipay')
|
||||
],
|
||||
'bulk_delete' => [
|
||||
'question' => __('Do you want to delete the selected license(s)?','formipay'),
|
||||
'cancelButton' => __('Cancel','formipay'),
|
||||
'confirmButton' => __('Confirm','formipay')
|
||||
],
|
||||
],
|
||||
'nonce' => wp_create_nonce('formipay-admin-licenses')
|
||||
]);
|
||||
}
|
||||
// wp_enqueue_style('page-licenses', FORMIPAY_URL . 'admin/assets/css/admin-licenses.css', [], FORMIPAY_VERSION, 'all');
|
||||
// wp_enqueue_script('page-licenses', FORMIPAY_URL . 'admin/assets/js/admin-licenses.js', ['jquery', 'gridjs'], FORMIPAY_VERSION, true);
|
||||
// wp_localize_script('page-licenses', 'formipay_licenses_page', [
|
||||
// 'ajax_url' => admin_url('admin-ajax.php'),
|
||||
// 'site_url' => site_url(),
|
||||
// 'columns' => [
|
||||
// 'id' => __('ID','formipay'),
|
||||
// 'product' => __('Product','formipay'),
|
||||
// 'order' => __('Order','formipay'),
|
||||
// 'email' => __('Email','formipay'),
|
||||
// 'key' => __('Key','formipay'),
|
||||
// 'status' => __('Status','formipay'),
|
||||
// 'expiry' => __('Expiry','formipay'),
|
||||
// 'date' => __('Date','formipay'),
|
||||
// ],
|
||||
// 'filter_form' => [
|
||||
// 'products' => [
|
||||
// 'placeholder' => __('Filter by Product','formipay'),
|
||||
// 'noresult_text' => __('No results found','formipay')
|
||||
// ],
|
||||
// 'status' => [
|
||||
// 'placeholder' => __('Filter by Status','formipay'),
|
||||
// 'noresult_text' => __('No results found','formipay')
|
||||
// ]
|
||||
// ],
|
||||
// 'modal' => [
|
||||
// 'delete' => [
|
||||
// 'question' => __('Do you want to delete the license?','formipay'),
|
||||
// 'cancelButton' => __('Cancel','formipay'),
|
||||
// 'confirmButton' => __('Delete Permanently','formipay')
|
||||
// ],
|
||||
// 'bulk_delete' => [
|
||||
// 'question' => __('Do you want to delete the selected license(s)?','formipay'),
|
||||
// 'cancelButton' => __('Cancel','formipay'),
|
||||
// 'confirmButton' => __('Confirm','formipay')
|
||||
// ],
|
||||
// ],
|
||||
// 'nonce' => wp_create_nonce('formipay-admin-licenses')
|
||||
// ]);
|
||||
// }
|
||||
}
|
||||
|
||||
/** GridJS data source */
|
||||
|
||||
Reference in New Issue
Block a user