From dcecdd55906caee678513d0fee2e61eac7a0a1ab Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Tue, 18 Apr 2023 17:13:39 +0200 Subject: [PATCH 1/2] Fixed the first part, group control --- .../godmode/wizards/HostDevices.class.php | 73 +++++++++++++------ 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index a2836b0d72..1ec12e67aa 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -825,12 +825,12 @@ class HostDevices extends Wizard ], ], ]; - + $form['rows'][0]['style'] = 'style de row'; $form['rows'][0]['columns'][1] = [ 'width' => '40%', - 'padding-right' => '12%', - 'padding-left' => '5%', - 'style' => 'min-width: 350px', + 'padding-right' => '10%', + 'padding-left' => '0%', + 'style' => 'min-width: 230px', 'inputs' => [ '0' => [ 'label' => ''.__('Task name').':', @@ -927,26 +927,57 @@ class HostDevices extends Wizard ]; // Group select (custom for this section). - $group_select = '
'; + // $group_select = ''.__('Group').':'; + /* + $group_select = $this->printInput( - $group_select .= $this->printInput( - [ - 'name' => 'id_group', - 'returnAllGroup' => false, - 'privilege' => $this->access, - 'type' => 'select_groups', - 'selected' => $this->task['id_group'], - 'return' => true, - 'class' => 'discovery_list_input', - 'simple_multiple_options' => true, - 'required' => true, - ] - ); + );*/ + + /* + $form['rows'][0]['columns'][2] = [ + 'width' => '40%', + 'padding-right' => '12%', + 'padding-left' => '5%', + 'style' => 'min-width: 250px', + 'inputs' => [ + '0' => [ + 'label' => ''.__('Group').':', + 'arguments' => [ + 'name' => 'id_group', + 'returnAllGroup' => false, + 'privilege' => $this->access, + 'type' => 'select_groups', + 'selected' => $this->task['id_group'], + 'return' => true, + 'class' => 'discovery_list_input', + 'simple_multiple_options' => true, + 'required' => true, + ], + ], + ], + ];*/ $form['rows'][0]['columns'][2] = [ - 'width' => '30%', - 'style' => 'min-width: 250px', - 'inputs' => ['0' => $group_select], + 'width' => '40%', + 'padding-right' => '12%', + 'padding-left' => '0', + 'style' => 'min-width: 210px', + 'inputs' => [ + '0' => [ + 'label' => ''.__('Group').':', + 'arguments' => [ + 'name' => 'id_group', + 'returnAllGroup' => false, + 'privilege' => $this->access, + 'type' => 'select_groups', + 'selected' => $this->task['id_group'], + 'return' => true, + 'class' => 'discovery_textarea_input', + 'simple_multiple_options' => true, + 'required' => true, + ], + ], + ], ]; $form['rows'][1]['style'] = 'style de row'; From e1e72ca8821b7f8e7d3060c9ea6c2be8c5c9ec34 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 19 Apr 2023 15:51:51 +0200 Subject: [PATCH 2/2] #10955 Fixed Netscan styling bugs. Group, module templates, Description --- .../godmode/wizards/HostDevices.class.php | 48 ++++--------------- .../class/ManageNetScanScripts.class.php | 2 +- 2 files changed, 11 insertions(+), 39 deletions(-) diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 1ec12e67aa..23a822d08d 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -792,7 +792,7 @@ class HostDevices extends Wizard $form['rows'][0]['columns'][0] = [ 'width' => '30%', - 'style' => 'padding: 9px;min-width: 250px;', + 'style' => 'padding: 9px;min-width: 188px;', 'inputs' => [ '1' => '
'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'
', '2' => [ @@ -825,10 +825,9 @@ class HostDevices extends Wizard ], ], ]; - $form['rows'][0]['style'] = 'style de row'; $form['rows'][0]['columns'][1] = [ 'width' => '40%', - 'padding-right' => '10%', + 'padding-right' => '8%', 'padding-left' => '0%', 'style' => 'min-width: 230px', 'inputs' => [ @@ -926,19 +925,11 @@ class HostDevices extends Wizard ], ]; - // Group select (custom for this section). - // $group_select = ''.__('Group').':'; - /* - $group_select = $this->printInput( - - );*/ - - /* - $form['rows'][0]['columns'][2] = [ + $form['rows'][0]['columns'][2] = [ 'width' => '40%', - 'padding-right' => '12%', - 'padding-left' => '5%', - 'style' => 'min-width: 250px', + 'padding-right' => '5%', + 'padding-left' => '0', + 'style' => 'min-width: 144px;', 'inputs' => [ '0' => [ 'label' => ''.__('Group').':', @@ -955,29 +946,6 @@ class HostDevices extends Wizard ], ], ], - ];*/ - - $form['rows'][0]['columns'][2] = [ - 'width' => '40%', - 'padding-right' => '12%', - 'padding-left' => '0', - 'style' => 'min-width: 210px', - 'inputs' => [ - '0' => [ - 'label' => ''.__('Group').':', - 'arguments' => [ - 'name' => 'id_group', - 'returnAllGroup' => false, - 'privilege' => $this->access, - 'type' => 'select_groups', - 'selected' => $this->task['id_group'], - 'return' => true, - 'class' => 'discovery_textarea_input', - 'simple_multiple_options' => true, - 'required' => true, - ], - ], - ], ]; $form['rows'][1]['style'] = 'style de row'; @@ -1617,6 +1585,10 @@ class HostDevices extends Wizard $(function() { SNMPExtraShow($("#snmp_version").val()); }); + + $("#id_network_profile").select2({ + placeholder: "'.__('Please select...').'" + }); '; if (enterprise_installed()) { diff --git a/pandora_console/include/class/ManageNetScanScripts.class.php b/pandora_console/include/class/ManageNetScanScripts.class.php index adfedf3e26..df76c56a96 100644 --- a/pandora_console/include/class/ManageNetScanScripts.class.php +++ b/pandora_console/include/class/ManageNetScanScripts.class.php @@ -564,7 +564,7 @@ class ManageNetScanScripts extends Wizard $data = []; $data[0] = __('Description'); - $data[1] = ''; $table->data['recon_description'] = $data;