From 8ccd5ad8cbb78cfbc677502b988f6ca856250dc9 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 4 Apr 2022 17:43:19 +0200 Subject: [PATCH] #8788 min number limit --- pandora_console/godmode/setup/performance.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index ad74c490c2..8c41cdda18 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -256,16 +256,18 @@ $table->style[0] = 'font-weight: bold'; $table->size[0] = '70%'; $table->size[1] = '30%'; -// enterprise_hook('enterprise_warnings_history_days'); $table->data[1][0] = __('Max. days before delete events'); - -$table->data[1][1] = html_print_input_text( - 'event_purge', - $config['event_purge'], - '', - 5, - 5, - true +$table->data[1][1] = html_print_input( + [ + 'type' => 'number', + 'size' => 5, + 'max' => 99999, + 'name' => 'event_purge', + 'value' => $config['event_purge'], + 'return' => true, + 'min' => ((((bool) $config['history_event_enabled'] === true) && $config['history_event_days'] > 0) ? $config['history_event_days'] + 1 : null), + 'style' => 'width:43px', + ] ); $table->data[2][0] = __('Max. days before delete traps');