mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
ui_link conversion -> useradmin
This commit is contained in:
@@ -100,8 +100,8 @@ if ($n ne "") {
|
||||
@uprilinks = ( );
|
||||
foreach $u (@upri) {
|
||||
if (&can_edit_user(\%access, $u)) {
|
||||
push(@uprilinks, "<a href='edit_user.cgi?".
|
||||
"user=$u->{'user'}'>".&html_escape($u->{'user'})."</a>");
|
||||
push(@uprilinks, &ui_link("edit_user.cgi?".
|
||||
"user=$u->{'user'}", &html_escape($u->{'user'}) ) );
|
||||
}
|
||||
else {
|
||||
push(@uprilinks, $u->{'user'});
|
||||
|
||||
@@ -221,16 +221,15 @@ if ($access{'ucreate'}) {
|
||||
}
|
||||
else { $cancreate = 1; }
|
||||
if ($cancreate) {
|
||||
push(@rv, "<a href=\"edit_user.cgi\">".
|
||||
"$text{'index_createuser'}</a>");
|
||||
push(@rv, &ui_link("edit_user.cgi", $text{'index_createuser'}) );
|
||||
}
|
||||
else {
|
||||
push(@rv, $text{'index_nomoreusers'});
|
||||
}
|
||||
}
|
||||
push(@rv, "<a href=\"batch_form.cgi\">$text{'index_batch'}</a>")
|
||||
push(@rv, &ui_link("batch_form.cgi", $text{'index_batch'}) )
|
||||
if ($access{'batch'});
|
||||
push(@rv, "<a href=\"export_form.cgi\">$text{'index_export'}</a>")
|
||||
push(@rv, &ui_link("export_form.cgi", $text{'index_export'}) )
|
||||
if ($access{'export'});
|
||||
return @rv;
|
||||
}
|
||||
@@ -259,15 +258,15 @@ if ($access{'gcreate'} == 1) {
|
||||
}
|
||||
else { $cancreate = 1; }
|
||||
if ($cancreate) {
|
||||
push(@rv, "<a href=\"edit_group.cgi\">$text{'index_creategroup'}</a>");
|
||||
push(@rv, &ui_link("edit_group.cgi", $text{'index_creategroup'}) );
|
||||
}
|
||||
else {
|
||||
push(@rv, $text{'index_nomoregroups'});
|
||||
}
|
||||
}
|
||||
push(@rv, "<a href=\"gbatch_form.cgi\">$text{'index_batch'}</a>")
|
||||
push(@rv, &ui_link("gbatch_form.cgi", $text{'index_batch'}) )
|
||||
if ($access{'batch'});
|
||||
push(@rv, "<a href=\"gexport_form.cgi\">$text{'index_export'}</a>")
|
||||
push(@rv, &ui_link("gexport_form.cgi", $text{'index_export'}) )
|
||||
if ($access{'export'});
|
||||
return @rv;
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ foreach $w (@whos) {
|
||||
$tm = defined(&mailboxes::parse_mail_date) ?
|
||||
&mailboxes::parse_mail_date($w->{'when'}) : undef;
|
||||
push(@table, [
|
||||
"<a href='list_logins.cgi?username=".&urlize($w->{'user'})."'>".
|
||||
&html_escape($w->{'user'})."</a>",
|
||||
&ui_link("list_logins.cgi?username=".&urlize($w->{'user'}),
|
||||
&html_escape($w->{'user'}) ),
|
||||
&html_escape($w->{'tty'}),
|
||||
&html_escape($tm ? &make_date($tm) : $w->{'when'}),
|
||||
$w->{'from'} ? &html_escape($w->{'from'})
|
||||
|
||||
@@ -68,7 +68,9 @@ if ($in{'multi'}) {
|
||||
foreach $u (&get_groups_list()) {
|
||||
if ($in{'group'} eq $u->[0]) { print "<tr class='filter_match' $cb>\n"; }
|
||||
else { print "<tr class='filter_match'>\n"; }
|
||||
print "<td width=20%><a href=\"\" onClick='return addgroup(\"$u->[0]\", \"$u->[3]\")'>$u->[0]</a></td>\n";
|
||||
print "<td width=20%>";
|
||||
print &ui_link("#", $u->[0], undef, "onClick='return addgroup(\"$u->[0]\", \"$u->[3]\");'");
|
||||
print "</td>\n";
|
||||
print "<td>$u->[3]</td> </tr>\n";
|
||||
$cnt++;
|
||||
}
|
||||
@@ -155,7 +157,9 @@ else {
|
||||
foreach $u (&get_groups_list()) {
|
||||
if ($in{'group'} eq $u->[0]) { print "<tr class='filter_match' $cb>\n"; }
|
||||
else { print "<tr class='filter_match'>\n"; }
|
||||
print "<td width=20%><a href=\"\" onClick='return select(\"$u->[0]\")'>".&html_escape($u->[0])."</a></td>\n";
|
||||
print "<td width=20%>";
|
||||
print &ui_link("#", &html_escape($u->[0]), undef, "onClick='return select(\"$u->[0]\");'");
|
||||
print "</td>\n";
|
||||
print "<td>".&html_escape($u->[3])."</td> </tr>\n";
|
||||
$cnt++;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,9 @@ if ($in{'multi'}) {
|
||||
if ($in{'user'} eq $u->[0]) { print "<tr class='filter_match' $cb>\n"; }
|
||||
else { print "<tr class='filter_match'>\n"; }
|
||||
$u->[6] =~ s/'/'/g;
|
||||
print "<td width=20%><a href=\"\" onClick='return adduser(\"$u->[0]\", \"$u->[6]\")'>$u->[0]</a></td>\n";
|
||||
print "<td width=20%>";
|
||||
print &ui_link("#", $u->[0], undef, "onClick='return adduser(\"$u->[0]\", \"$u->[6]\");'");
|
||||
print "</td>\n";
|
||||
print "<td>$u->[6]</td> </tr>\n";
|
||||
$cnt++;
|
||||
}
|
||||
@@ -148,7 +150,9 @@ else {
|
||||
foreach $u (&get_users_list()) {
|
||||
if ($in{'user'} eq $u->[0]) { print "<tr class='filter_match' $cb>\n"; }
|
||||
else { print "<tr class='filter_match'>\n"; }
|
||||
print "<td width=20%><a href=\"\" onClick='return select(\"$u->[0]\")'>$u->[0]</a></td>\n";
|
||||
print "<td width=20%>";
|
||||
print &ui_link("#", $u->[0], undef, "onClick='return select(\"$u->[0]\");'");
|
||||
print "</td>\n";
|
||||
print "<td>$u->[6]</td> </tr>\n";
|
||||
$cnt++;
|
||||
}
|
||||
|
||||
@@ -2520,12 +2520,10 @@ if ($_[0]->{'noedit'}) {
|
||||
return $dis;
|
||||
}
|
||||
elsif ($_[0]->{'dn'}) {
|
||||
return "<a href='edit_user.cgi?dn=".&urlize($_[0]->{'dn'})."'>".
|
||||
"$dis</a>";
|
||||
return &ui_link("edit_user.cgi?dn=".&urlize($_[0]->{'dn'}), $dis);
|
||||
}
|
||||
else {
|
||||
return "<a href='edit_user.cgi?user=".&urlize($_[0]->{'user'})."'>".
|
||||
"$dis</a>";
|
||||
return &ui_link("edit_user.cgi?user=".&urlize($_[0]->{'user'}), $dis);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2540,12 +2538,10 @@ if ($_[0]->{'noedit'}) {
|
||||
return &html_escape($_[0]->{'group'});
|
||||
}
|
||||
elsif ($_[0]->{'dn'}) {
|
||||
return "<a href='edit_group.cgi?dn=".&urlize($_[0]->{'dn'})."'>".
|
||||
&html_escape($_[0]->{'group'})."</a>";
|
||||
return &ui_link("edit_group.cgi?dn=".&urlize($_[0]->{'dn'}), &html_escape($_[0]->{'group'}) );
|
||||
}
|
||||
else {
|
||||
return "<a href='edit_group.cgi?group=".&urlize($_[0]->{'group'})."'>".
|
||||
&html_escape($_[0]->{'group'})."</a>";
|
||||
return &ui_link("edit_group.cgi?group=".&urlize($_[0]->{'group'}), &html_escape($_[0]->{'group'}) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user