User list and other fixes

This commit is contained in:
Jose Gonzalez 2023-03-14 13:46:49 +01:00
parent b428e77e7c
commit bd9ec31c2b
2 changed files with 59 additions and 43 deletions

View File

@ -1741,7 +1741,8 @@ if (is_metaconsole() === false) {
imodule_name = $(value).html();
if (imodule_name != <?php echo "'".__('None')."'"; ?>) {
id_imodule = $(value).attr('value');
$("select[name='autorefresh_list[]']").append($("<option></option>").val(id_imodule).html('<i>' + imodule_name + '</i>'));
$("select[name='autorefresh_list[]'] option").each(function() { $(this).attr("selected", true) });
$("select[name='autorefresh_list[]']").append($("<option></option>").val(id_imodule).html('<i>' + imodule_name + '</i>').attr("selected", true));
$("#autorefresh_list_out").find("option[value='" + id_imodule + "']").remove();
$("#autorefresh_list").find("option[value='']").remove();
$("#autorefresh_list").find("option[value='0']").remove();

View File

@ -461,43 +461,72 @@ if (($filter_group == 0) && ($filter_search == '')) {
$filterTable = new stdClass();
$filterTable->width = '100%';
$filterTable->class = 'fixed_filter_bar';
$filterTable->class = 'filter-table-adv';
$filterTable->rowclass[0] = '';
$filterTable->cellstyle[0][0] = 'width:0';
$filterTable->cellstyle[0][1] = 'width:0';
$filterTable->data[0][0] = __('Group');
$filterTable->data[1][0] = html_print_select_groups(
false,
'AR',
true,
'filter_group',
$filter_group,
'',
'',
0,
true
$filterTable->data[0][] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'AR',
true,
'filter_group',
$filter_group,
'',
'',
0,
true
)
);
$filterTable->data[0][1] = __('Search').ui_print_help_tip(__('Search by username, fullname or email'), true);
$filterTable->data[1][1] = html_print_input_text(
'filter_search',
$filter_search,
__('Search by username, fullname or email'),
30,
90,
true
);
$filterTable->cellstyle[1][2] = 'vertical-align: bottom';
$filterTable->data[1][2] = html_print_submit_button(
$filterTable->data[0][] = html_print_label_input_block(
__('Search'),
'search',
false,
html_print_input_text(
'filter_search',
$filter_search,
__('Search by username, fullname or email'),
30,
90,
true
).ui_print_input_placeholder(
__('Search by username, fullname or email'),
true
)
);
$form_filter = "<form method='post'>";
$form_filter .= html_print_table($filterTable, true);
$form_filter .= html_print_div(
[
'icon' => 'search',
'class' => 'float-right',
'mode' => 'secondary mini',
'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button(
__('Search'),
'search',
false,
[
'icon' => 'search',
'class' => 'float-right',
'mode' => 'secondary mini',
],
true
),
],
true
);
$form_filter .= '</form>';
ui_toggle(
$form_filter,
'<span class="subsection_header_title">'.__('Filter').'</span>',
__('Filter'),
'filter',
true,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
);
$is_management_allowed = true;
if (is_metaconsole() === false && is_management_allowed() === false) {
@ -518,20 +547,6 @@ if (is_metaconsole() === false && is_management_allowed() === false) {
);
}
if (is_metaconsole() === true) {
$filterTable->width = '96%';
$form_filter = "<form class='filters_form' method='post'>";
$form_filter .= html_print_table($filterTable, true);
$form_filter .= '</form>';
ui_toggle($form_filter, __('Show Options'));
} else {
$form_filter = "<form method='post'>";
$form_filter .= html_print_table($filterTable, true);
$form_filter .= '</form>';
echo $form_filter;
}
// Urls to sort the table.
$url_up_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=up&pure='.$pure;
$url_down_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=down&pure='.$pure;