From 587d261ab70c5ebc85563fd25dfb7133c8d477be Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 6 Apr 2023 00:38:32 +0200 Subject: [PATCH] fix empty submit --- src/Manage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Manage.php b/src/Manage.php index f3c36ac..50a5661 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -50,7 +50,7 @@ class Manage extends dcNsProcess $current = ManageVars::init(); # Delete logs - if ($current->selected_logs || $current->all_logs) { + if ($current->selected_logs && !empty($current->entries) || $current->all_logs) { try { dcCore::app()->log->delLogs($current->entries, $current->all_logs); dcPage::addSuccessNotice( @@ -113,7 +113,8 @@ class Manage extends dcNsProcess (new Submit(['selected_logs']))->class('delete')->value(__('Delete selected logs')), (new Submit(['all_logs']))->class('delete')->value(__('Delete all logs')), ]), - (new Text('', + (new Text( + '', dcCore::app()->adminurl?->getHiddenFormFields('admin.plugin.' . My::id(), $current->filter->values()) . dcCore::app()->formNonce() )),