mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Fix to drop an option to enable paginating and let it just work
This commit is contained in:
@ -34,8 +34,7 @@ default_expire=Default expiry date for new users (dd/mm/yyyy),3,None
|
||||
default_other=Create and update in other modules,1,1-Yes,0-No
|
||||
|
||||
line4=Display options,11
|
||||
display_max=Maximum number of users or groups to display,0
|
||||
display_max_auto=Use paginated table to display users and groups?,1,1-Yes,0-No
|
||||
display_max=Maximum number of items to display before pagination is applied,0
|
||||
sort_mode=Sort users and groups by,4,0-Order in file,1-Username,2-Real name,3-Surname,4-Shell,5-UID or GID,6-Home directory
|
||||
last_count=Number of previous logins to display,3,Unlimited
|
||||
last_show=Show last login in user list?,1,1-Yes,0-No
|
||||
|
@ -41,7 +41,7 @@ if ($can_users) {
|
||||
print &ui_tabs_start_tab("mode", "users");
|
||||
}
|
||||
|
||||
if (!$config{'display_max_auto'} &&
|
||||
if ($config{'display_mode'} != 1 &&
|
||||
@ulist > $config{'display_max'}) {
|
||||
# Display advanced search form
|
||||
print "<b>$text{'index_toomany'}</b><p>\n";
|
||||
@ -125,7 +125,7 @@ if ($can_groups) {
|
||||
print &ui_tabs_start_tab("mode", "groups");
|
||||
}
|
||||
|
||||
if (!$config{'display_max_auto'} &&
|
||||
if ($config{'display_mode'} != 1 &&
|
||||
@glist > $config{'display_max'}) {
|
||||
# Display group search form
|
||||
print "<b>$text{'index_gtoomany'}</b><p>\n";
|
||||
|
@ -2323,8 +2323,7 @@ while(@ginfo = &my_getgrent()) {
|
||||
$gidgrp{$ginfo[2]} = $ginfo[0];
|
||||
}
|
||||
&my_endgrent();
|
||||
|
||||
my $upagination = $config{'display_max_auto'};
|
||||
my $upagination = scalar(@{$users}) > $config{'display_max'};
|
||||
if ($upagination) {
|
||||
my $upagination_opts = \%in;
|
||||
$upagination_opts->{'top_offset_px'} = 125;
|
||||
@ -2454,7 +2453,7 @@ foreach my $g (@$groups) {
|
||||
}
|
||||
$anyedit = 0 if ($noboxes);
|
||||
|
||||
my $gpagination = $config{'display_max_auto'};
|
||||
my $gpagination = scalar(@{$groups}) > $config{'display_max'};
|
||||
if ($gpagination) {
|
||||
my $gpagination_opts = \%in;
|
||||
$gpagination_opts->{'top_offset_px'} = 125;
|
||||
|
Reference in New Issue
Block a user