fix empty submit

This commit is contained in:
Jean-Christian Denis 2023-04-06 00:38:32 +02:00
parent 1fdf81c50b
commit 587d261ab7
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -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()
)),