diff --git a/pandora_console/godmode/snmpconsole/snmp_trap_generator.php b/pandora_console/godmode/snmpconsole/snmp_trap_generator.php index 746d52a12d..36d3246901 100755 --- a/pandora_console/godmode/snmpconsole/snmp_trap_generator.php +++ b/pandora_console/godmode/snmpconsole/snmp_trap_generator.php @@ -134,7 +134,7 @@ $table->data[1][2] = html_print_label_input_block( ) ); -$table->data[2][1] = html_print_label_input_block( +$table->data[2][0] = html_print_label_input_block( __('SNMP Agent'), html_print_input_text( 'snmp_agent', @@ -155,7 +155,7 @@ $types = [ 5 => 'EGP neighbor loss (5)', 6 => 'Enterprise (6)', ]; -$table->data[2][2] = html_print_label_input_block( +$table->data[2][1] = html_print_label_input_block( __('SNMP Type'), html_print_select( $types, diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 4a2d5343cb..d6c1e5c764 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -532,7 +532,7 @@ class SnmpConsole extends HTML [ 'icon' => 'delete', 'mode' => 'secondary', - 'onClick' => "javascript:return confirm(\''.__('Are you sure?').'\')", + 'onClick' => "javascript:return confirm('".__('Are you sure?')."')", ], true ); @@ -542,45 +542,47 @@ class SnmpConsole extends HTML ['type' => 'form_action'] ); - echo '
'; - echo '

'.__('Severity').'

'; - echo '
'; + $legend = ''; - echo ''; - echo ''; - echo ''; + $legend .= ''; + $legend .= ''; + $legend .= ''; + $legend .= ''; + + ui_toggle($legend, __('Legend')); // Load own javascript file. echo $this->loadJS(); @@ -1493,7 +1495,7 @@ class SnmpConsole extends HTML } }); - $('#submit-updatebt').click(function() { + $('#button-updatebt').click(function() { let array = []; $('input[name="snmptrapid[]"]:checked').each(function() { array.push(this.value); @@ -1520,7 +1522,7 @@ class SnmpConsole extends HTML } }); - $('#submit-deletebt').click(function() { + $('#button-deletebt').click(function() { let array = []; $('input[name="snmptrapid[]"]:checked').each(function() { array.push(this.value); diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 52d01ae76d..1f1f57c832 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -542,7 +542,7 @@ function filemanager_file_explorer( break; case 'create_text_file': - title_action = ""; + title_action = ""; break; case 'upload_file': @@ -791,7 +791,7 @@ function filemanager_file_explorer( && (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3) && ($readOnly === false) ) { - $data[4] .= ''.html_print_image('images/book_edit.png', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter']).''; + $data[4] .= ''.html_print_image('images/enable.svg', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter main_menu_icon']).''; } $data[4] .= ''; @@ -830,10 +830,10 @@ function filemanager_file_explorer( 'images/create_file.png', true, [ - 'title' => __('Create a Text'), + 'title' => __('Create File'), 'class' => 'invert_filter', ] - ).''.__('Create a Text').' + ).''.__('Create File').''; } @@ -937,40 +937,46 @@ function filemanager_file_explorer( echo "
"; - echo ""; - echo html_print_image( - 'images/create_directory.png', - true, + $buttons[] = html_print_button( + __('Create directory'), + 'create_directory', + false, + 'show_form_create_folder()', [ - 'title' => __('Create directory'), - 'class' => 'invert_filter', - ] + 'class' => 'margin-right-2 invert_filter secondary', + 'icon' => 'create_directory', + ], + true, + false ); - echo ''; if ($allowCreateText === true) { - echo ""; - echo html_print_image( - 'images/create_file.png', - true, + $buttons[] = html_print_button( + __('Create file'), + 'create_text', + false, + 'show_create_text_file()', [ - 'title' => __('Create text'), - 'class' => 'invert_filter', - ] + 'class' => 'margin-right-2 invert_filter secondary', + 'icon' => 'create_file', + ], + true, + false ); - echo ''; } - echo ""; - echo html_print_image( - 'images/upload_file.png', - true, + $buttons[] = html_print_button( + __('Upload file/s'), + 'upload_file', + false, + 'show_upload_file()', [ - 'title' => __('Upload file/s'), - 'class' => 'invert_filter', - ] + 'class' => 'margin-right-2 invert_filter secondary', + 'icon' => 'upload_file', + ], + true, + false ); - echo ''; // Show Modal Real Path $modal_real_path = "
Real path to plugin execution is:
@@ -997,6 +1003,11 @@ function filemanager_file_explorer( } html_print_table($table); + + html_print_action_buttons( + implode('', $buttons), + ['type' => 'form_action'] + ); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 155968e557..07cb1ee433 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -6754,9 +6754,13 @@ function html_print_label_input_block( if (isset($options['label_class']) === true) { $label_class = $options['label_class']; } + + if (isset($options['div_id']) === true) { + $div_id = 'id="'.$options['div_id'].'"'; + } } - $output = '
'; + $output = '
'; if ($label !== null) { $output .= ''; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 86d1eb910c..14aef9dd0c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -10415,6 +10415,22 @@ button div.fail { -webkit-mask: url(../../images/fail@svg.svg) no-repeat center / contain; } +button div.upload_file { + mask: url(../../images/upload_file.png) no-repeat center / contain; + -webkit-mask: url(../../images/upload_file.png) no-repeat center / contain; +} + +button div.create_file { + mask: url(../../images/create_file.png) no-repeat center / contain; + -webkit-mask: url(../../images/create_file.png) no-repeat center / contain; +} + +button div.create_directory { + mask: url(../../images/create_directory.png) no-repeat center / contain; + -webkit-mask: url(../../images/create_directory.png) no-repeat center / + contain; +} + button div.cog.rotation { animation: rotation 4s infinite linear; }
'; + $legend .= '

'.__('Severity').'

'; + $legend .= '
'; $priorities = get_priorities(); $half = (count($priorities) / 2); $count = 0; foreach ($priorities as $num => $name) { if ($count == $half) { - echo '
'; + $legend .= '
'; } - echo ''.$name.''; - echo '
'; + $legend .= ''.$name.''; + $legend .= '
'; $count++; } - echo '
'; - echo '

'.__('Status').'

'; - echo ''.__('Validated').''; - echo '
'; - echo ''.__('Not validated').''; - echo '
'; - echo '

'.__('Alert').'

'; - echo ''.__('Alert').''; - echo '
'; - echo ''.__('Not fired').''; - echo '
'; - echo '

'.__('Action').'

'; - echo '
'; - echo html_print_image('images/validate.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Validate'); - echo '
'; - echo '
'; - echo '
'; - echo html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Delete'); - echo '
'; - echo '
'; + $legend .= '

'.__('Status').'

'; + $legend .= ''.__('Validated').''; + $legend .= '
'; + $legend .= ''.__('Not validated').''; + $legend .= '
'; + $legend .= '

'.__('Alert').'

'; + $legend .= ''.__('Alert').''; + $legend .= '
'; + $legend .= ''.__('Not fired').''; + $legend .= '
'; + $legend .= '

'.__('Action').'

'; + $legend .= '
'; + $legend .= html_print_image('images/validate.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Validate'); + $legend .= '
'; + $legend .= '
'; + $legend .= '
'; + $legend .= html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Delete'); + $legend .= '
'; + $legend .= '