diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php
index 0055f5bf82..6d4890acc6 100644
--- a/pandora_console/include/functions_snmp_browser.php
+++ b/pandora_console/include/functions_snmp_browser.php
@@ -1492,9 +1492,9 @@ function snmp_browser_print_create_module_massive($target='agent', $snmp_conf, $
true
);
- $table->data[2][0] = __($target_item.' available').html_print_input_image('select_all_left', 'images/tick.png', 1, '', true, ['title' => __('Select all')]);
+ $table->data[2][0] = ''.__($target_item.' available').'
'.__('Select all').html_print_checkbox_switch('select_all_left', 1, false, true);
$table->data[2][1] = '';
- $table->data[2][2] = __($target_item.' to apply').html_print_input_image('select_all_right', 'images/tick.png', 1, '', true, ['title' => __('Select all')]);
+ $table->data[2][2] = ''.__($target_item.' to apply').'
'.__('Select all').html_print_checkbox_switch('select_all_right', 1, false, true);
$table->data[3][0] = html_print_select(
[],
diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php
index 7d7abd5fb6..e43257827e 100644
--- a/pandora_console/operation/snmpconsole/snmp_browser.php
+++ b/pandora_console/operation/snmpconsole/snmp_browser.php
@@ -321,21 +321,48 @@ function add_module_massive_controller(target = 'agent')
});
// Select all Items.
- $("input[name='select_all_left']").click(function () {
- $('#id_item option').map(function() {
- $(this).prop('selected', true);
- });
-
+ $("#checkbox-select_all_left").change(function () {
+ if ($("#checkbox-select_all_left").prop('checked') == true) {
+ $('#id_item option').map(function() {
+ $(this).prop('selected', true);
+ });
+ } else {
+ $('#id_item option').map(function() {
+ $(this).prop('selected', false);
+ });
+ }
+
return false;
});
- $("input[name='select_all_right']").click(function () {
- $('#id_item2 option').map(function() {
- $(this).prop('selected', true);
- });
-
+
+ $("#checkbox-select_all_right").change(function () {
+ if ($("#checkbox-select_all_right").prop('checked') == true) {
+ $('#id_item2 option').map(function() {
+ $(this).prop('selected', true);
+ });
+ } else {
+ $('#id_item2 option').map(function() {
+ $(this).prop('selected', false);
+ });
+ }
+
return false;
});
+ $("#id_item").click(function(e) {
+ if ($("#checkbox-select_all_left").prop('checked') == true) {
+ $("#checkbox-select_all_left").prop('checked', false);
+ }
+ });
+
+ $("#id_item2").click(function(e) {
+ if ($("#checkbox-select_all_right").prop('checked') == true) {
+ $("#checkbox-select_all_right").prop('checked', false);
+ }
+ });
+
+ $(".p-switch").css('display', 'table');
+
// Select items.
$("#right").click (function () {
jQuery.each($("select[name='id_item[]'] option:selected"), function (key, value) {