From 6d6c8fe197426acb169b5981ecd5c19ad44bff64 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 8 Jul 2019 17:57:23 +0200 Subject: [PATCH] Added filter by agent - #4318 --- .../godmode/massive/massive_delete_modules.php | 8 ++++++++ pandora_console/godmode/massive/massive_edit_modules.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index c52878c5da..7d8d64141a 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -501,6 +501,11 @@ $table->data['form_agents_4'][1] = html_print_select( true ); +$table->rowstyle['form_agents_filter'] = 'vertical-align: top;'; +$table->rowclass['form_agents_filter'] = 'select_agents_row select_agents_row_2'; +$table->data['form_agents_filter'][0] = __('Filter Agents'); +$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); + $table->rowstyle['form_agents_3'] = 'vertical-align: top;'; $table->rowclass['form_agents_3'] = 'select_agents_row select_agents_row_2'; $table->data['form_agents_3'][0] = __('Agents'); @@ -763,6 +768,9 @@ $(document).ready (function () { .html (value["alias"]); $("#id_agents").append (option); }); + //Filter agents. Call the function when the select is fully loaded. + var textNoData = ""; + filterByText($('#id_agents'), $("#text-filter_agents"), textNoData); }, "json" ); diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 1a18b410d5..f52707cb2a 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -473,6 +473,11 @@ $table->data['form_agents_4'][1] = html_print_select( true ); +$table->rowstyle['form_agents_filter'] = 'vertical-align: top;'; +$table->rowclass['form_agents_filter'] = 'select_agents_row select_agents_row_2'; +$table->data['form_agents_filter'][0] = __('Filter agents'); +$table->data['form_agents_filter'][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); + $table->rowstyle['form_agents_3'] = 'vertical-align: top;'; $table->rowclass['form_agents_3'] = 'select_agents_row select_agents_row_2'; $table->data['form_agents_3'][0] = __('Agents'); @@ -1638,6 +1643,9 @@ $(document).ready (function () { .html(value["alias"]); $("#id_agents").append (option); }); + //Filter agents. Call the function when the select is fully loaded. + var textNoData = ""; + filterByText($('#id_agents'), $("#text-filter_agents"), textNoData); }, "json" );